1、简介
C++主要是面向对象编程
2、代码编写
1 #include//iostream头文件包含输入输出函数 2 3 4 int main() 5 { 6 7 using namespace std; 8 9 cout << "Come up and C++ me some time."; 10 11 cout << endl; 12 13 cout << "Yout won't regret it!" << endl; 14 15 return 0; 16 } ~
3、知识点
①、预处理器编译指令#include
②、函数头int main()
③、编译指令using namespace std
④、函数体,main后面{}中内容
⑤、cout为C++的输出函数
⑥、换行符endl
⑦、返回值return
⑧、“;”分号表示一行结尾
⑨、一个程序必须包含有一个名为main的主函数
⑩、注释//或者
4、编译以及运行代码



