Friday, July 31, 2009

My compiler won't work, every time i try to compile and run this happens?

on visual c++ it says cannot execute


on dev c++ it executes yes.. but its too fast, the black window flashes on and off before i can read anything on it


same for codewarrior..... its just a simple program that shows hello world and it doesn't have any mistake bacause i tried it at the university lab and saved a copy to my usb disk and brought it home,, any idea what can be done?

My compiler won't work, every time i try to compile and run this happens?
add a "cin.ignore();" or a "system("PAUSE");" to your code so that the window doesn't go away until you hit Enter. Maybe that may reveal the problem.
Reply:It's not your compiler, you wrote a console application and it is closing before you see a result. Try adding this before return in the main statement:





printf("Press any key to continue");


getch();
Reply:type getch() at the end of your program

wedding reception flowers

No comments:

Post a Comment