什么是开始写C ++ C程序员的坏习惯? [英] What are the bad habits of C programmers starting to write C++?
问题描述
一个讨论刚刚结束的在程序员的坏习惯已经笑的太的接触到的语言,当他们在另一种语言开始编程。最好的例子是一个Pascal程序员开始的#define开始{
和的#define结束}开始编写C时
A discussion recently ended laughing at the bad habits of programmers that have been too exposed to a language when they start programming in another language. The best example would be a Pascal programmer starting to #define begin {
and #define end }
when starting to write C.
目标是要努力赶上C程序员的坏习惯,当他们开始使用C ++。
Goal is to try to catch the bad habits of C programmers when they start using C++.
讲述大的不的,你遇到过。通过回答一个建议,请尽量达到一种最佳的。
Tell about the big don't that you encountered. One suggestion by answer, please, to try to achieve a kind of best of.
有关兴趣良好习惯的那些,看看接受的答案,这<一个href=\"http://stackoverflow.com/questions/1420685/c-good-habits-re-transitioning-to-c\">question.
For the ones interested in good habits, have a look at the accepted answer to this question.
推荐答案
使用原始指针和资源,而不是RAII对象。
Using raw pointers and resources instead of RAII objects.
这篇关于什么是开始写C ++ C程序员的坏习惯?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!