- 3,498
- 2,298
So having an issue that my tired noob eyes/brain can't work out. Read my notes/book/looked online to no avail. I know it's something simple that I'm just not seeing.. anyhow, i'll only post one set of .h/.cpp as the others are basically the same. The main.cpp is provided by the instructor.
When I compile, I'm getting undefined reference errors for any call to/for a function from the class
When I compile, I'm getting undefined reference errors for any call to/for a function from the class
Code:
In function `TestStudent()':
main.cpp[ATTACH=full]85254[/ATTACH].text+0x24c): undefined reference to `CStudent::CStudent()'
main.cpp[ATTACH=full]85255[/ATTACH].text+0x257): undefined reference to `CStudent::GetGPA()'
main.cpp[ATTACH=full]85256[/ATTACH].text+0x2ae): undefined reference to `CStudent::CStudent(CStudent const&)'
main.cpp[ATTACH=full]85257[/ATTACH].text+0x2b9): undefined reference to `CStudent::GetGPA()'
main.cpp[ATTACH=full]85258[/ATTACH].text+0x328): undefined reference to `CStudent::CStudent(double)'
[code][/spoiler]
[u]teacher.h[/u]
[QUOTE][/QUOTE][u]teacher.cpp[/u]
[QUOTE][/QUOTE]
[u]main.cpp[/u]
[QUOTE][/QUOTE]