0

I'm new to C++ and I'd like to start correctly. But I need to know what are the best practices for code sharing, like:

_ use int void (main) instead of other statements;
_ use standard libraries when possible;
_ what are the naming conventions for C++? I've some saying that names like int nX, float fMyFloat, string sName are not good for OOP or are deprecated. So, what would be good names?
_ the same for object members: shall I use "getFunction()", "setFunction()" and so?

If someone can point me a good "tutorial"...

Thanks!

3
Contributors
2
Replies
4
Views
8 Years
Discussion Span
Last Post by Ancient Dragon
0

>>But I need to know what are the best practices for code sharing, like:

For every 1,000 programmers there are 1,000 coding styles! Every coder develops his/her own coding style or use the coding style standard set by the company. A good place to start is the links that siddhant posted and by reading current programming books, paying attention to the coding styles presented on those books. Eventually you will develop your own style in a way that makes sense to you.

There is no such thing as a "deprecated coding standard or style" because there were never any official C or C++ coding standards to begin with.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.