Using a variable with the same name in different spaces

前端 未结 4 718
走了就别回头了
走了就别回头了 2020-12-20 10:51

This code compiles, but I have a run time error in Visual Studio:

Run-time check failure #3 - the variable \'x\' is being used without being initializ

4条回答
  •  -上瘾入骨i
    2020-12-20 11:35

    There is no scope resolution operator in C, so you may not be able to use

    int x = x;
    

    in your program.

提交回复
热议问题