C++ Expected class-name before '{' token. Inheritance -


I'm googling and reading about this and have not yet come up with an answer, maybe someone can help me this.

I want my UserPile class to be able to access data members and classroom member functions from my cardpiece class. I am mentioning an error in the title. Can anyone explain what is happening? The legacy tutorial I have seen looks like my code, except for me, which has many source code files.

  // CardPile.h #include & lt; Iostream & gt; #include & lt; String & gt; # Include & lt; Vector & gt; using namespace std; Class card; Class cardpile {secure: vector & lt; Cards & gt; Pile; // card card []; Int size pile; Public: CardPil (); Insert zero card (card); Card Access Card (Int); Zero display file (); Zero alteration (); // Start the heap zero Start (deck); // Create Deck of Card Deal (CardPyle & CardPil & amp ;;); Zero absence (); Bull Check Fraci (); Zero discard (cardpelle); Zero Draw Card (CardPil & amp; nbsp;); }; // user player Std using the name; Category UserPlayer: Public CardPile {Private: // CardPil userpile; Public: UserPlayer (); }; //UserPlayer.cpp #include "UserPlayer.h" #Include "CardPile.h" UserPlayer :: UserPlayer () {}  

I have nothing in this UserPlayer class yet Because I'm using functions from base class, so I want to compile it at least before starting to write.

Thank you for helping someone.

You CardPile.h in UserPlayer.h If you want to use the class cardpile there.

You are also missing the guard in the header, like:

  // CardPile.h: #ifndef CARDPILE_H # Defined CARDPILE_H class cardPil {//. .}} #endif  

Without it you can effectively add CardPile.h to UserPlayer.cpp - once From UserPlayer.h and once the line via #include "CardPile.h"


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -