Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: THE USE OF "cout statement inside the for loop" 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 
well first thingz first!!!!!...
both of them should work.....
and the first example program that u have shown is a BAD style of writing the code.....

both ur programz WILL GIVE DIFFERENT OUTPUTZ!!!!!

ur first program is like thiz.....
#include 

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

cout << endl;



return 0;
}


the OUTPUT TO THE FIRST ONE SHOULD BE.....
1
2
3
4
5
6
7
8
9
10
11

OBSERVE.....
the third argument that u give in the for loop is basically executed only AFTER the whole loop is done.....since i++is incremented first the output changez and is different from the second program
the second program that u have shown ......
#include 

int main()
{

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


return 0;
}


the OUTPUT TO THE FIRST ONE SHOULD BE.....
0
1
2
3
4
5
6
7
8
9
10




i dont see any advantages in writing the first way.....what i think is that itz a bad style ......
as far as memory and processor speedz concern.....i think u wouldnt find much of a any difference.....





"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
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 
QuestionHow to get a pixel's RGB value. Pin
Francis Chau15-Mar-05 14:41
Francis Chau15-Mar-05 14:41 
AnswerRe: How to get a pixel's RGB value. Pin
Christian Graus15-Mar-05 15:02
protectorChristian Graus15-Mar-05 15:02 

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.