Top Ten Tips for Correct C++ Coding

Here we give you a list of advices for correct c++ coding.These guidelines are in no particular order , except that the earlier items are addressed more to mistakes that beginners have trouble with.




#1: Don’t Confuse Assign (=) with Test-for-Equality (==).

This one is elementary, although it might have baffled Sherlock Holmes. The following looks innocent and would compile and run just fine if C++ were more like BASIC: