I was curious, what is the scope of variables declared inside a class constructor which are not data members of that class?
For example, if a constructor needs an iterating int i
, will this variable be destroyed after the constructor finishes, or is it then global for the program?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…