C++是一种中级语言,于1979年在贝尔实验室设计开发的,C++是C的更高一级,
是面向对象的语言
可运行于多种平台上,如Windows,MAC,UNIX等
//实例
#include<iostream>
using namespace std;
int main()
{
cout<<"helloworld"<<endl;
return 0;
}
endl 可以换成\n
//实例2
#include<iostream>
using namespace std;
int main()
{
cout<<"helloworld"<<"\n";
return 0;
}
习题:来找茬
//错误
#include<iostream>
int main()
{
cout>>"helloworld">>"\n";
return 0;
}
有四处错误,聪明的你能找出来吗?