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!

>>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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.