#include <iostream>
 
using namespace std;
 
int i = 1;
int j = 2;
 
int main()
{
 
    int i = 9;  //C/C++中合法,Java中出现编译错误:变量已定义
    int j = j;  //C/C++中虽然合法,但是j在main内部重新声明,导致j的值未知。
 
    cout << i << endl;
    cout << j << endl;
    return 0;
}




相关文章:

  • 2021-09-01
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
猜你喜欢
  • 2022-12-23
  • 2021-10-13
  • 2022-02-20
  • 2022-12-23
  • 2021-09-04
  • 2021-06-26
  • 2021-06-04
相关资源
相似解决方案