Alex Rivera | Logout

What is a good naming convention for vars, methods, etc in C++?

Asked 2010-09-14T05:48:49.757
82

I come from a the Objective-C and Cocoa world where there are lots of conventions and many people will say it makes your code beautiful! Now programming in C++ I cannot find a good document like this one for C++.

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html

Standard C++ probably does not have something like above but I hope I can stick to some other SDK or APIs (like Microsoft's(?),etc) conventions.

I hope you can provide me with some links.

Edit
Report

1 Answer

15

We follow the guidelines listed on this page: C++ Programming Style Guidelines


I'd also recommend you read The Elements of C++ Style by Misfeldt et al, which is quite an excellent book on this topic.

answered 2010-09-14T07:42:01.973

Your Answer