命名空间

namespace name //不能重复 { void sort() { }; } using namespace name; //类似于头文件之类的吧,不过放在代码之中,必须放在namespace name之后 int main() { std::sort(); }
c++基础 | 2017-03-29 12:51 | 阅读 720 次 | 评论 0 条

我的第一个c++program

#include<iostream> int main() { using namespace std; cout << "let's coding !haha~" <<endl;//输出语句且换行 cout ; //这个语句可以跳过 cout << "you wont's be so worried!"; return 0; }
c++基础 | 2017-03-28 20:22 | 阅读 844 次 | 评论 0 条