Linking two .cpp and a .h files

后端 未结 8 910
小蘑菇
小蘑菇 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:42

    You need to put an include like this:

    #include "headerfilename.h"
    

    at the very top of each .cpp document.

提交回复
热议问题