   No clue why this error is appearing
  Yea as the post says, theres an error thats really annoying me.  It goes on for what seems like forever about line 6, but there is no problem.  It says something about being nested too deep, but idk what that means.  It also says parse error before blah blah blah blah.  All my semi colons and parenthesis and all that are where they belong.  I have a feeling that its more just about being nested too deep since even when i take my code for the certain class out, it still gives me the same errors.  There is nothing wrong with the code for the class, I think that its just what the error says. Nested too deep.  Still not sure what it really means though and where my problem is.  Please help me >.<  This is the first time I get so close to completing what I set out to do :((in programming anyways)Thanks.P.S. Is this set up for a derived class correct?class Weapon : public Item {   private:    int W_damage;   public:    //all the functions and stuff};   
  Even if the error message is long, you might go ahead and post it, along with the offending line and surrounding code. It does sound like you're missing a brace or semicolon somewhere, but it's hard to say. If your IDE has a 'balancing' feature, you might also check to see whether encompassing pairs of braces such as namespaces and classes are balanced correctly.   ;Quote:Original post by SonicD007There is nothing wrong with the code for the class, I think that its just what the error says.Well, trust me, your compiler is better than you at checking code validity. If it says that something is wrong, then you can be sure that something is wrong [smile]. From your error description, I'd guess that you have a missing ;, ) or } somewhere - or perhaps you used : instead of ;. You should post the exact error text and the relevant code here if you want more help.Regards,   ;  Here are the classes.  The other code compiled fine.  Just adding the derived classes is what screwed something up.Weapon.h//-------------------------------------------//  Include Files//-------------------------------------------#include <windows.h>#include "Weapon.cpp"//-------------------------------------------//  Class Definition//-------------------------------------------/*class Weapon : public Item{   private: int W_damage; public:    int GetWeaponDamage(); int SetWeaponDamage();}; */Armor.h//---------------------------------------------//  Include Files//---------------------------------------------#include <windows.h>#include "Armor.cpp"//---------------------------------------------//  Class Definition//---------------------------------------------class Weapon : public Item{    private:  int A_defense;public:  int GetArmorDefense();  int SetArmorDefense(int amount);};[/source]Heres the error message:Compiler: Default compilerBuilding Makefile: "C:\Documents and Settings\user\Desktop\Dragon Ball Sagas\Makefile.win"Executing  make...make.exe -f "C:\Documents and Settings\user\Desktop\Dragon Ball Sagas\Makefile.win" allg++.exe -c Weapon.cpp -o Weapon.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/DX90SDK/Include/DShowIDL"  In file included from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6,  from Weapon.h:6,  from Weapon.cpp:6:Weapon.h:5:10: #include nested too deeplyWeapon.h:6:10: #include nested too deeplymake.exe: *** [Weapon.o] Error 1Execution terminated;  Including source files is bad. That is take out this line:#include "Armor.cpp"   ;  Never include a .cpp file! Your compiler will sort out what is defined where during the link phase; you don't have to tell it.Your problem is that Weapon.h is including Weapon.cpp and Weapon.cpp is including Weapon.h. This leads to an infinite inclusion cycle. Just get rid of the #include "Weapon.cpp", and add an include guard to the header file.An include gaurd is a mechanism to prevent a header being included more than once. It takes the form:#ifndef HEADER_INCLUDED#define HEADER_INCLUDED...// header contents here...#endifWhere HEADER_INCLUDED is some unique identitfier.I strongly reccomend that you read this article on organizing code files in C++Hope that helps.   ;  O wow, I feel dumb lol.  Ok now that I did what you told me, I think I did miss a ,;)or}.  Now just have to find out where I messed up.Is my setup for the derived class correct though? (Never used a derived class before)Also, thank you so much!  I will take a look at the article.  Never can learn too much :D   