C++入门 输出Hello World
#include <iostream>using namespace std;int main(){ cout << "Hello, world!" << endl; return 0;}
它等效于
#include <iostream>using namespace std;int main(){ cout << "Hello, world! \n"; return 0;}
#include <iostream>using namespace std;int main(){ cout << "Hello, world!" << endl; return 0;}
它等效于
#include <iostream>using namespace std;int main(){ cout << "Hello, world! \n"; return 0;}
我第一次接触C++是在2013年,那时候我刚刚学了PHP,其实我是没有打算去学C++的,只是因为随着学的东西越多,发现用C++写的库和项目太多了。学习一下方便学习别人的算法和思想,以便提升自己。 还记得我的...
#include <iostream> using namespace std; int addnum(int a,int b) { return a+b; } int ...
讲到函数就可以讲讲局部变量和全局变量了,什么是局部变量呢?什么又是全局变量? #include <iostream> using namespace std; int x,y,z;//x,y,z是全局变量 i...
#include<iostream> using namespace std; int main() { cout << "The size of int is&nb...
#include<iostream> using namespace std; int main() { int x=0; for(x=0;x<10;x++) { if(x==3) break;...
/*C风格字符串的声明和使用 #include<cstdio.h> int main() { char x[]={'H','e','l','l','o','&...