/*
* Time: 202-1-15
* Author: Fei Dongxu <Phil616@163.com>
*/
#include <iostream>
using namespace std;
int main(){
cin << "Hello World!" << endl;
return 0;
}
//This is a standard C++ program which can print a string "Hello World!" with a new line
//to console window
// is a single line annotation
/*
are a pair of block annotation.
All the content in side are annotations
*/
using namespace std;
//this is a convenient way to simply the std::cin
otherwise the program will look like this:
unconvinient way:
#include <iostream>
int main(){
std::cin << "Hello World!" << std::endl;
return 0;
}
With MinGw or gcc/g++ compiler
g++ <FILENAME> -o <TARGETNAME>
for example:
g++ hello.cpp -o hello.exe