I've recently started with c++ (in fact this is my first project).
I've got some experience in C# so starting to learn c++ wasn't that hard.
But now I've met a road block.
The error started showing when I added my second class inheriting from another class.
It's seems the error has something to do with my #define's and my #include's but I've been tinkering around with it and I can't find a solution on my own.
You'll propably see that I've structured everything very weirdly, there were just .cpp files (and the Library.h file) before I started tinkering with this problem. I don't know if that has something to do with the problem.
Here's all the code:
Here's the errors:
I'm sorry if i'm wasting your time with a simple problem. Usually I can work things out on my own, but I spent an hour yesterday with it (and I can't put a breakpoint and go through the includes/defines step by step either = / ) without prevailing.
1>c:\users\haku\documents\visual studio 2008\projects\ccptest02\ccptest02\player.h(34) : error C2061: syntax error : identifier 'Weapon'
1>c:\users\haku\documents\visual studio 2008\projects\ccptest02\ccptest02\player.h(36) : error C2065: 'wpn' : undeclared identifier
1>c:\users\haku\documents\visual studio 2008\projects\ccptest02\ccptest02\player.h(37) : error C2065: 'arm' : undeclared identifier
1>c:\users\haku\documents\visual studio 2008\projects\ccptest02\ccptest02\main.cpp(27) : error C2661: 'Player::Player' : no overloaded function takes 2 arguments
Thanks in beforehand!
// Mattias Hakulinen