creating classes link error

后端 未结 2 932
不知归路
不知归路 2021-01-25 09:13

I\'m using Dev-C++ 5.2.0.1

I took an example of how to put a class in another file from a website but it resulted in an error.

In the file class.h I have:

<
2条回答
  •  故里飘歌
    2021-01-25 09:54

    foo() only have definition. If you want to use a function that doesn't have a implement, Linker will give you this error "undefined reference".

提交回复
热议问题