Witam,
W pisaniu aplikacji gdzie kod jest w kilku plikach jestem laikiem, ale do tej pory udawało mi się. Teraz napotkałem na problem którego nie potrafię rozwiązać. Przesiedziałem już nad tym ze 3 godziny próbując to skompilować w Visual Studio 11 Beta i Visual Studio 10. Wydaję mi się że to IDE nie powinno mieć aż tak podstawowych błędów dlatego pewnie wina leży po mojej stronie. Oto kody:
//Wyklad.h
#pragma once
#include <iostream>
#include <vector>
#include "Student.h"
//using namespace std;
class Wyklad{
private:
std::string nazwa;
int idWykladu;
std::vector <Student> studenci;
public:
Wyklad(std::string, int);
~Wyklad(void);
};
//Student.h
#pragma once
#include "Wyklad.h"
#include <iostream>
#include <vector>
//using namespace std;
class Student{
private:
std::string nazwisko;
int idStudent;
std::vector <Wyklad> wyklady;
public:
Student(std::string, int);
~Student(void);
};
//Uczelnia.h
#pragma once
#include <iostream>
#include <vector>
#include "Student.h"
using namespace std;
class Uczelnia{
private:
string nazwa;
string adres;
int telefon;
vector <Student> studenci;
public:
Uczelnia(string, string, int);//nazwa adres telefon
~Uczelnia(void);
void usunStudenta(void);
void OdczytajDaneStudenta(void);
void OdczytajWszystkichStudentow(void);
void DodajWydzial(void);
void UsunWydzial(void);
void OdczytajWszystkieDaneWydzialu(void);
void OdczytajWszystkieWydzialy(void);
void DodajStudenta(void);
};
kompilator wywala mi coś takiego
Wyklad.cpp
1>c:\users\lukasz\documents\moje programy\inzynieria\lab5-6\lab6kod\lab6kod\student.h(13): error C2065: 'Wyklad' : undeclared identifier
1> Uczelnia.cpp
1>c:\users\lukasz\documents\moje programy\inzynieria\lab5-6\lab6kod\lab6kod\wyklad.h(13): error C2065: 'Student' : undeclared identifier
1> Student.cpp
1>c:\users\lukasz\documents\moje programy\inzynieria\lab5-6\lab6kod\lab6kod\wyklad.h(13): error C2065: 'Student' : undeclared identifier
Reszty plików nie wstawiałem bo nie wiem czy ma to sens, jeśli potrzeba to uzupełnię post o resztę plików. Proszę o pomoc