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;}什么是注释?#include <iostream> int main()//我是注释 {/*我是注释*/ /*我 是 注 释 */ std::cout <&...
#include <iostream> using namespace std; int addnum(int a,int b) { return a+b; } int ...
什么是数组呢?顾名思义,一组数,不一定是数,也可以是char类型的字符组(我自己给char类型数组起的名字)怎么创建数组呢?int 数组名[数组成员数]; int a[3];我就创建了一个叫做a的整数数组,数组中包含3个数,我应该怎么修改a数组的值呢?a[0]=1; a[1]...
#include<iostream> using namespace std; void addarr(int *k,int len); //文中形如sizeof(x)/sizeof(x[0]) 是用数组占用空...