Tutorial by Examples

Suppose you are comparing value with some variable if ( i == 2) //Bad-way { doSomething; } Now suppose you have mistaken == with =. Then it will take your sweet time to figure it out. if( 2 == i) //Good-way { doSomething; } Then, if an equal sign is accidentally left out, the ...
Suppose you are creating a function that requires no arguments when it is called and you are faced with the dilemma of how you should define the parameter list in the function prototype and the function definition. You have the choice of keeping the parameter list empty for both prototype and d...

Page 1 of 1