14 lines
221 B
C++
14 lines
221 B
C++
|
// 找错
|
||
|
#include <iostream>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
const int n = 10;
|
||
|
const int &p = n;
|
||
|
// p++; // 错误,不能修改常量引用所引用的值
|
||
|
cout << "n=" << n << endl;
|
||
|
return 0;
|
||
|
}
|