That is possible in Java but in C++ you have to do this way:Code:for( int i = 0; i < 5; i++ ) { cout << "You suck!!!" << endl; } for( int i = 0; i < 5; i++ ) { cout << "You suck!!!" << endl; }
orCode:for( int i = 0; i < 5; i++ ) { cout << "You suck!!!" << endl; } for( int j = 0; j < 5; j++ ) { cout << "You suck!!!" << endl; }
C++ approach for this problem sucks. So is there any reason for this annoying problem? Is this a C++ bug???Code:int i; for( i = 0; i < 5; i++ ) { cout << "You suck!!!" << endl; } for( i = 0; i < 5; i++ ) { cout << "You suck!!!" << endl; }
Please, guyz!!! I am not Java troll........



LinkBack URL
About LinkBacks


