Saturday, May 9, 2009

C++ compiler?

I have just started to program. then i wrote the "Hello world" program in C++. then i just had to compile it. but it's not working. i mean i have the file program on my desktop but when i want to run it nothing happens . can some1 help me ?

C++ compiler?
Stuff is happening... faster than you can see it. The program is exiting once it says hello. You can either run it from a command prompt to see its output, or add the following lines before the return statement:





printf("press any key to continue");


getch();
Reply:You probably have to run it from a command prompt.





Go to the start menu, choose run, type cmd in the box and click ok.





Then go to where your program is (i.e. c:\documents and settings\administrator\desktop) and type the name of the .exe for your program. If it isn't a .exe you probably didn't compile it right, but htat is a whole different set of issues.
Reply:Try running it from a command window. Probably now it's poping on up and it goes away to quickly to see what's happening.
Reply:if you need a C++ compiler here


No comments:

Post a Comment