常量引用的两种方式。
#include<iostream> using namespace std; int main() { const int &i = 1; cout << i << endl; int &&b = 2;//右值引用 cout << b << endl; while (1); return 0; }
#笔经#
#include<iostream> using namespace std; int main() { const int &i = 1; cout << i << endl; int &&b = 2;//右值引用 cout << b << endl; while (1); return 0; }
相关推荐
招聘动态