C++ Object Initialization (Stack)
问题 I saw today a c++ Initialization of a class which I am not familiar with. CPrice price = CPrice(); The Initialization should normally look like this CPrice price; I would have guessed that the first one should throw an error or something. What happens here ? I would guess that the variable is on the stack because it wasn't initialized with new . I use Visual studio express 2012 with microsofts c++ compiler. Is it maybe something which is microsoft compiler specific and thus allowed ? 回答1: