jeudi 6 octobre 2022

Declaration in C++ [closed]

enter image description here

I am stuck and i do not know why it keeps error field Y has incomplete type 'Unit'. I have tried declaring Y but it keeps failing when i run it on codeblocks

#ifndef UNIT_H_INCLUDED
#define UNIT_H_INCLUDED
#include <iostream>
#include <string>
using namespace std;
class Unit {
public:
Unit();
Unit(Y);
Y GetName();
Y SetName(Y);
Y GetID();
Y SetID(Y);
Y GetCredits() const;
Y SetCredits(Y);
private:
Y name;
Y id;
Y credits;
};
 ostream & operator <<(Y);
 istream & operator >>(Y);
 #endif

Aucun commentaire:

Enregistrer un commentaire