qfedu-cpp-level/day2/homework/h1.cpp

14 lines
221 B
C++
Raw Permalink Normal View History

2023-07-25 20:00:23 +08:00
// 找错
#include <iostream>
using namespace std;
int main()
{
const int n = 10;
const int &p = n;
// p++; // 错误,不能修改常量引用所引用的值
cout << "n=" << n << endl;
return 0;
}