Click here to Skip to main content
15,884,058 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: string to time conversion Pin
David Crow16-Mar-05 2:59
David Crow16-Mar-05 2:59 
GeneralActiveX control problem please help Pin
rdeekonda15-Mar-05 19:12
rdeekonda15-Mar-05 19:12 
GeneralRead Params in ActiveX Pin
DharmendraNathW15-Mar-05 19:12
DharmendraNathW15-Mar-05 19:12 
GeneralHi Everyone Pin
Rassul Yunussov15-Mar-05 18:14
Rassul Yunussov15-Mar-05 18:14 
GeneralRe: Hi Everyone Pin
John R. Shaw16-Mar-05 12:34
John R. Shaw16-Mar-05 12:34 
GeneralCrossWord puzzle alogrithm Pin
Mohsen Saad15-Mar-05 18:02
Mohsen Saad15-Mar-05 18:02 
GeneralRe: CrossWord puzzle alogrithm Pin
Ravi Bhavnani16-Mar-05 3:39
professionalRavi Bhavnani16-Mar-05 3:39 
GeneralTHE USE OF "cout statement inside the for loop" Pin
phijophlip15-Mar-05 17:56
phijophlip15-Mar-05 17:56 
Hello Friends,

Please observe the code which is given below

#include <iostream.h>

int main()
{
for(int i=0 ; i<=10 ;i++ , cout << i << endl );

cout << endl;



return 0;
}


Please observe the the second which is given below

#include <iostream.h>

int main()
{

for(int j=0 ; j<=10 ;j++ )
cout << j << endl;


return 0;
}

My question is how is it possible to use cout in the inside the for loop.Is their any difference in the between the two program? Can anyone point the difference in terms of cpu speed,memory management etc.What is advantage of writing the code as you saw in the first section of the code ie the first program

Hoping for a reply.

Best Regards,
Phijo
Smile | :)
GeneralRe: THE USE OF &quot;cout statement inside the for loop&quot; Pin
Serge Krynine15-Mar-05 18:54
Serge Krynine15-Mar-05 18:54 
GeneralRe: THE USE OF "cout statement inside the for loop" Pin
namaskaaram15-Mar-05 18:59
namaskaaram15-Mar-05 18:59 
General(modified) THE USE OF "cout statement inside the for loop" Pin
normanS15-Mar-05 19:12
normanS15-Mar-05 19:12 
GeneralRe: THE USE OF "cout statement inside the for loop" Pin
David Crow16-Mar-05 3:09
David Crow16-Mar-05 3:09 
GeneralNeed Help for writing event log with more than one parameter Pin
Amy Yang15-Mar-05 17:41
Amy Yang15-Mar-05 17:41 
GeneralRe: Need Help for writing event log with more than one parameter Pin
David Crow16-Mar-05 3:28
David Crow16-Mar-05 3:28 
GeneralRe: Need Help for writing event log with more than one parameter Pin
Amy Yang16-Mar-05 3:49
Amy Yang16-Mar-05 3:49 
GeneralRe: Need Help for writing event log with more than one parameter Pin
David Crow16-Mar-05 3:57
David Crow16-Mar-05 3:57 
GeneralRe: Need Help for writing event log with more than one parameter Pin
cmk16-Mar-05 16:45
cmk16-Mar-05 16:45 
GeneralRe: Need Help for writing event log with more than one parameter Pin
Amy Yang16-Mar-05 17:54
Amy Yang16-Mar-05 17:54 
GeneralMax Range For Some Constants Pin
IceBerG7115-Mar-05 16:02
IceBerG7115-Mar-05 16:02 
GeneralRe: Max Range For Some Constants Pin
Serge Krynine15-Mar-05 16:22
Serge Krynine15-Mar-05 16:22 
GeneralAbort capture screen Pin
Jack.Fu15-Mar-05 15:06
Jack.Fu15-Mar-05 15:06 
GeneralRe: Abort capture screen Pin
Christian Graus15-Mar-05 15:21
protectorChristian Graus15-Mar-05 15:21 
GeneralRe: Abort capture screen Pin
FlyingTinman15-Mar-05 15:53
FlyingTinman15-Mar-05 15:53 
GeneralRe: Abort capture screen Pin
Member 161799927-May-05 7:13
Member 161799927-May-05 7:13 
GeneralRe: Abort capture screen Pin
FlyingTinman27-May-05 8:18
FlyingTinman27-May-05 8:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.