C: Good Habits re: Transitioning to C++

后端 未结 13 632
梦毁少年i
梦毁少年i 2020-12-13 02:47

I\'ve been learning C at Varsity for just shy of 2months now, and next year we\'ll be moving on to C++.

Are there any habits I should get into with my C programmin

13条回答
  •  臣服心动
    2020-12-13 03:28

    C++ is object orientated, C is not. So common things like keeping pointer code clean and comment's on functions/methods and understand how to not get infinite preprocessor loops using #IFDEFs.

    However the object orientated approach can often be nicer to actually code thinking about objects. So you need to think about the new features difference.

提交回复
热议问题