Linking two .cpp and a .h files

后端 未结 8 912
小蘑菇
小蘑菇 2021-02-02 01:00

I\'m doing an exercise (from the third chapter of Thinking in C++) but I have a problem linking two .cpp files.

This is the exercise:

Create a h

8条回答
  •  臣服心动
    2021-02-02 01:54

    First of all, how can you have func1(), func2(), func3() without having a return statement. Try to put your header body inside these (#include guards) :

    #ifndef func_ex.h
    #define func_ex.h
    /* your code */
    
    #endif 
    

提交回复
热议问题