C++ Access violation reading location 0xcdcdcdcd error on calling a function

前端 未结 5 1019
醉梦人生
醉梦人生 2020-12-06 21:26

Please consider the below scenario:

I have a header file and its corresponding source file:

exmp.h (Header file)

exmp.cpp (

5条回答
  •  萌比男神i
    2020-12-06 22:16

    I can see stars.
    Does this work instead?

    class sampleClass
    {
    
      .....
      .....
      myClass ptr;
    };
    

    Do not use pointers unless you know what you are doing.

提交回复
热议问题