Why the below piece of code is not crashing , though i have deleted the object?

后端 未结 10 1333
北海茫月
北海茫月 2021-01-18 02:29
class object
{
  public:
    void check()
    {
      std::cout<<\"I am doing ok...\"<

        
10条回答
  •  长情又很酷
    2021-01-18 03:04

    I think it depends on the environment (platform/compiler)...
    This at least gives unexpected behaviour. I think you are lucky that it doesn't crash in your case ;-)

提交回复
热议问题