Hi! Sorry my first post is asking for help.
This is supposed to be able to work with a user's information and, in the end, calculate the student's GPA.
We've(We..the rest of my class) tried troubleshooting and looking up information but it's still not working out and I personally have no idea why.
But why do I have to use "oostring.h" in the test proggie and "oostring.cpp" in the class? If I try to use "oostring.cpp" for both, I get 71 linker errors.
// student.cpp
#include "student.h"
// put function bodies in the .cpp file
student::student(){
Name = "Name Here";
Classi = 1;
Sid = "1234567";
Ctaken = 0;
Ccomp = 0;
Qualpt = 0;}
The reason you get linker errors when you #include cpp files is because this puts the function body in every cpp file. When a function exists in multiple cpp files, the linker sees this as multiple different functions all with the same name, so it doesn't know which one to use.