mercredi 1 février 2017

C++ undeclared identifier with 2 classes in same header

Please help, I have these lines of code:

#ifndef UNTITLED_ARMY_H
#define UNTITLED_ARMY_H

using namespace std;

#include <vector>

class Country {

public:

    vector <DiplomacyRequest> pendingDiplomacy;  //Line 12

    Country() {} } ;

class DiplomacyRequest {

    Country issuerCountry;

    int money = 0;

    void acceptRequest();
    void declainRequest();

public:
    DiplomacyRequest() {} };

#endif //UNTITLED_ARMY_H

and I've been provided with an error:

error: use of undeclared identifier 'DiplomacyRequest', at line 12

Where is the fault?

Aucun commentaire:

Enregistrer un commentaire