Friday, July 31, 2009

How to run my newly created program in Visual C++?

I am attempting to learn how to use C++. i made my first program and like the book said i compiled it, but then the book says to run it to make my message appear, but i cant figure out how to run it?

How to run my newly created program in Visual C++?
to compile or build: select Build and then Build Solution will compile





once it has been built you can run your program from the Debug menu by selecting Start Without Debugging





--------


EDIT:





printf("This C stuff is easy!\n";


doesn't have ) at the end before ;





u must close the parentheses





--------


EDIT:





If u read the error, it explains what error u have.





u need to practice a lot. don't worry about ur first programs u make.





--------


EDIT:





to see where the error is, double click on the error message





like in this image


http://www.riverblade.co.uk/products/vis...





if u double click on the highlighted (blue colored) error message, u would see the place of error





the error message might not be always helpful but u would get some hints.
Reply:/*Prints a message on the screen*/





#include %26lt;stdio.h%26gt;





using namespace std;





void main()


{


cout%26lt;%26lt;"This C stuff is easy!\n";


return 0;


}
Reply:After build, CTRL + F5.


No comments:

Post a Comment