Hello, this is my first post on this forum so I hope this will make sense (I already tried searching the site for people having similar problems but I didn't see any that seemed to match my problem):
I need a little help with my homework :P
I am using Dev C++ environment to compile my program. I've gotten my program down to 6 (identical) errors. I am trying to write a method to check whether two dates are the same.
I have the class "date" declared in a .h file and I am defining them in a seperate .cpp file.
I've #included date.h in both date.cpp and main.cpp and I've tried just moving the code from date.h into date.cpp and got rid of the #includes but it still gives me the same "expected primary-experession before '.' token" error when I try to compile.
Here is the section of code where it is giving me the errors:
Thanks alot! I changed Date.x to this->x and it compiles and runs perfectly. thanks for the tip Superdude! Your way is much simpler and easier to read. Hopefully I'll think of that in the future and save myself some typing :P