上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 68 下一页
摘要: 1 #include 2 #include 3 using namespace std; 4 5 void main() 6 { 7 auto fun = [](char *str)->int 8 { 9 int res = 0; 10 char *p = str; 11 int length = strl... 阅读全文
posted @ 2018-03-15 16:13 喵小喵~ 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 class myclass 5 { 6 public: 7 int num; 8 int num2; 9 10 public: 11 myclass(int num) 12 { 13 this->num = 0; 14 this->n... 阅读全文
posted @ 2018-03-15 13:33 喵小喵~ 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 5 template 6 void show(T t) 7 { 8 cout 12 void all(Args...args) 13 { 14 int arr[] = { (show(args),0)... }; 15 //int arr[],约束展开,... 阅读全文
posted @ 2018-03-14 18:05 喵小喵~ 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 //拷贝构造,构造,析构,赋值重载 5 //C++会给每个类生成四个函数,写了新函数会覆盖 6 class myclass 7 { 8 public: 9 //不允许拷贝构造 10 myclass(const myclass &my) = delete; 11 //mycla... 阅读全文
posted @ 2018-03-14 17:59 喵小喵~ 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 class myclass 8 { 9 public: 10 myclass() 11 { 12 cout my;//分配器 28 myclass *p = my.allocate(1)... 阅读全文
posted @ 2018-03-14 16:43 喵小喵~ 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 using namespace std::placeholders; 8 9 class myclass 10 { 11 public: 12 int get(int data) 13 { 1... 阅读全文
posted @ 2018-03-14 16:32 喵小喵~ 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 5 void main() 6 { 7 cout ::max() ::min() << endl; 9 cin.get(); 10 } 阅读全文
posted @ 2018-03-14 16:18 喵小喵~ 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 //异常与错误不一样,异常一般能正常工作 5 //错误就是程序无法正常工作,无法编译 6 //异常让程序在错误的输入,文件不存在,内存异常仍然可以正常工作 7 8 int divv(int a, int b) 9 { 10 try 11 { 12 if (b == ... 阅读全文
posted @ 2018-03-14 16:16 喵小喵~ 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 //vector g_all; 10 //创建list存放数据 11 list g_all; 12 13 //统计共有多少数据 14 int i = 0; 15 16 /... 阅读全文
posted @ 2018-03-14 15:21 喵小喵~ 阅读(843) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 void main() 10 { 11 ifstream fin("F:\\大数据\\大数据相关数据\\kaifang.txt"); 12 ofstream fou... 阅读全文
posted @ 2018-03-14 15:04 喵小喵~ 阅读(237) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 68 下一页