Strange bracket mismatch undefined class error

This is a discussion on Strange bracket mismatch undefined class error within the C++ Programming forums, part of the General Programming Boards category; I've been checking my code over and over and over again, I'm missing something, perhaps someone with an outside view ...

Erm, I believe you have a declaration in the .h file? Because the "undefined" comes from the .h file. Maybe you simply misspelled it? I can't say.
Your definition is totally wrong (or is this your declaration & you're defining inline?).
It should be

In the Deal function what exactly is wrong with the if's and else's? I've went over the logic a hundred times but I still can't see the problem, I know this is the function with the error because thats the function I was working on when I compiled and alluva sudden had this error.

maybe I should post more code?
That code will let you know how the Dealer class is used. I'm pretty proud of my setup here lol.

OK, so game.h uses Dealer declared in Dealer.h and includes it. So what's in Deadler.h?

Originally Posted by Shamino

In the Deal function what exactly is wrong with the if's and else's? I've went over the logic a hundred times but I still can't see the problem, I know this is the function with the error because thats the function I was working on when I compiled and alluva sudden had this error.

Although I suppose it doesn't matter much since you're returning after the IF, but anyway.
From what I can see, it might just be circular dependencies? A uses B and B uses A. That's the best I can say right now, anyway.

Circular dependencies eh? I think dealer uses human_player, which are both subclasses to player.. And then game uses dealer and player... I guess it could just use player, then that might eliminate some issues.... Any suggestions?

First you'll have to find out if this is the case. Easiest way is to look for header includes header, like A.h includes B.h and B.h includes A.h. If you find that scenario, then you have circular depenencies.

Then you might need one of these solutions. Either:
Put forward declarations (like

If your class members (not using pointers), then solution one won't work (because the compiler can't call the constructor to your class, nor destructor since it only knows the class exists, but doesn't have the declaration for it).
Or you could just make that member a pointer and allocate using new in your constructor and delete it in the destructor.