Very beginner question but how the heck do header files work?
I'm using RakNet and have a cpp file with a bunch of functions using it and its variables. Works great. Then I made a function which was declared (?) in a .h file, as per below:
int getplayernumberfromguid(RakNetGUID id);
I then get a TON of "error C2065: 'RakNetGUID' : undeclared identifier" errors for the same line.
So, I figure, in my infinite wisdom: no problem - I'll just copy and paste the #include stuff from the top of the cpp file into the top of the h file. If it works for one, it should work for the other. Well, that just brings in a mess of new errors including errors inside the RakNet files which should have no issues whatsoever.
Any idea what I'm doing wrong? How are you really supposed to do this?
Thanks in advance!