摘要: 1 #include <iostream> 2 3 4 5 using namespace std; 6 7 //通过指针进行传递 8 void print_Values(int *x,size_t n) 9 { 10 for(size_t i=0;i!=n;i++) 11 { 12 cout<<x 阅读全文
posted @ 2020-03-27 16:25 萌萌~ 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 推荐的做法是使用迭代器当做形参 1 #include <iostream> 2 #include <new> 3 #include <bitset> 4 #include <string> 5 #include <stdexcept> 6 #include <vector> 7 8 9 using 阅读全文
posted @ 2020-03-27 12:52 萌萌~ 阅读(638) 评论(1) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <new> 3 #include <bitset> 4 #include <string> 5 #include <stdexcept> 6 7 8 using namespace std; 9 10 11 12 //非引用形参 传递 阅读全文
posted @ 2020-03-27 09:37 萌萌~ 阅读(533) 评论(0) 推荐(0) 编辑