Redefinition of class

前端 未结 3 902
再見小時候
再見小時候 2021-01-22 17:35

I got three .cpp files and two header files.

But when i compile them, meaning the Point.cpp, Data.cpp and main.cpp, it will say



        
3条回答
  •  灰色年华
    2021-01-22 17:58

    In each of your header files write:

    #ifndef MYHEADERNAME_H
    #define MYHEADERNAME_H
    
    code goes here....
    
    #endif
    

提交回复
热议问题