Compiler Recognize Classes

Im using CodeBlocks on windows vista, I have an error which reads:
error 'Person' does not name a type.
This is found in my weapon class.

#include "Person.h"

class Weapon

Person person; // This and the line below it produce an error
// int attack(Person person);

std::string _name;

int _condition;
int _damage;



However I am able to use Person class in other files which I have defined myself. Furthermore, the person class and other classes which I defined myself can use the weapons class. It is just for some reason, the weapons class refuses to include the other classes I have defined. I believe it must be a linking error but I have tried everything. Does anyone know why code blocks will not allow my weapons class to recognize my other classes?
If needed I can provide the Person.h - Person.cpp File

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!