摘要:
string Arr[] = {"123", "123456", "12345", "12", "1"}; vector<string> vecStr(Arr, Arr + sizeof(Arr)/sizeof(string)); for (size_t i = 0, sz = vecStr.siz 阅读全文
摘要:
//find_if谓词使用 bool isShorter(const string &s1, const string &sz){ return s1.size() < sz.size(); } int main() { string Arr[] = {"123", "123456", "12345 阅读全文
摘要:
bool isShorter(const string &s1, const string &sz){ return s1.size() < sz.size(); } int main() { string Arr[] = {"123", "123456", "12345", "12", "1"}; 阅读全文
摘要:
//数组引用形参 void print(int(&arr)[10]){ for (auto elem : arr){ std::cout << elem << ", "; } // for (int i = 0; i < 10;i++){ // cout << arr[i] << endl; // 阅读全文
摘要:
//参数传递之传递多维数组(C++中没有真正的多维数组,即数组的数组) void print(int(*matrix)[10], int rowSize){ for (int i = 0; i < rowSize; i++){ for (int j = 0; j < 10; j++) { /*std 阅读全文