First open visual c++6.0, run C + +
Choose the file>new menu command, select Files in the popup window
Select C++source file from files, enter the source program name on the right Hello,world select the location where the file is saved, click Confirm
Enter code in the edit window
#include <iostream.h>
void Main ()
{
cout<< "hello,world!" <<endl;
}
Then compile the code
Build a Running Program
Then I want to output "I want to learn the C + + language, as long as the persistence of victory", what should be done?
#include <iostream.h>
void Main ()
{
cout<< "I want to learn the C + + language, as long as the persistence of victory" <<endl;
}
Compile the build to execute it.
This chapter summarizes: cout is a system-defined output stream that has only one statement cout<< "hello,world!" <<endl;, for output Hello world.
<< is the insertion operation symbol Endl the action of line wrapping.
The first chapter, the first knowledge of C + + language, the establishment of a C + + program--hello,world