Ok , ale czy mógłbyś trochę to bardziej wytłumaczyć (ewentualnie na moim przykładzie) ?
bo ja robię coś takiego w pliku point.h :
#include "plane.h"
#include "quaternion.h"
class Quaternion;
class Plane;
i :
61 IntelliSense: identifier "Point" is undefined d:\erasmus\301cr\porfolio\mymath\include\vector.h 37
62 IntelliSense: identifier "Point" is undefined d:\erasmus\301cr\porfolio\mymath\include\vector.h 37
63 IntelliSense: identifier "Point" is undefined d:\erasmus\301cr\porfolio\mymath\include\vector.h 76
64 IntelliSense: identifier "Point" is undefined d:\erasmus\301cr\porfolio\mymath\include\vector.h 77
65 IntelliSense: identifier "Point" is undefined d:\erasmus\301cr\porfolio\mymath\include\vector.h 79
66 IntelliSense: identifier "Point" is undefined d:\erasmus\301cr\porfolio\mymath\include\vector.h 79
67 IntelliSense: identifier "Point" is undefined d:\erasmus\301cr\porfolio\mymath\include\vector.h 80
68 IntelliSense: identifier "Point" is undefined d:\erasmus\301cr\porfolio\mymath\include\vector.h 81
69 IntelliSense: identifier "Point" is undefined d:\erasmus\301cr\porfolio\mymath\include\plane.h 15
Error 33 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\erasmus\301cr\porfolio\mymath\include\angleaxis.h 16
Error 34 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\erasmus\301cr\porfolio\mymath\include\angleaxis.h 16
Error 38 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\erasmus\301cr\porfolio\mymath\include\angleaxis.h 22
Error 39 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\erasmus\301cr\porfolio\mymath\include\angleaxis.h 22
Error 42 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\erasmus\301cr\porfolio\mymath\include\quaternion.h 19
Error 43 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\erasmus\301cr\porfolio\mymath\include\quaternion.h 19
Error 46 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\erasmus\301cr\porfolio\mymath\include\quaternion.h 39
Error 47 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\erasmus\301cr\porfolio\mymath\include\quaternion.h 39
Error 49 error C2614: 'Quaternion' : illegal member initialization: 'v' is not a base or member d:\erasmus\301cr\porfolio\mymath\include\quaternion.h 16
Error 24 error C2535: 'Vector::Vector(void)' : member function already defined or declared d:\erasmus\301cr\porfolio\mymath\include\vector.h 37
Error 29 error C2535: 'Vector Vector::vectorFromPoints(void)' : member function already defined or declared d:\erasmus\301cr\porfolio\mymath\include\vector.h 80
Error 2 error C2535: 'Plane::Plane(void)' : member function already defined or declared d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 13 error C2535: 'Plane::Plane(void)' : member function already defined or declared d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 51 error C2535: 'Plane::Plane(void)' : member function already defined or declared d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 9 error C2228: left of '.getZ' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 20 error C2228: left of '.getZ' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 58 error C2228: left of '.getZ' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 7 error C2228: left of '.getY' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 18 error C2228: left of '.getY' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 56 error C2228: left of '.getY' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 5 error C2228: left of '.getX' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 16 error C2228: left of '.getX' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 54 error C2228: left of '.getX' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 45 error C2146: syntax error : missing ';' before identifier 'v' d:\erasmus\301cr\porfolio\mymath\include\quaternion.h 39
Error 41 error C2146: syntax error : missing ';' before identifier 'getV' d:\erasmus\301cr\porfolio\mymath\include\quaternion.h 19
Error 32 error C2146: syntax error : missing ';' before identifier 'getAxis' d:\erasmus\301cr\porfolio\mymath\include\angleaxis.h 16
Error 37 error C2146: syntax error : missing ';' before identifier 'axis' d:\erasmus\301cr\porfolio\mymath\include\angleaxis.h 22
Error 48 error C2065: 'newV' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\quaternion.h 16
Error 4 error C2065: 'newNormal' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 6 error C2065: 'newNormal' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 8 error C2065: 'newNormal' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 15 error C2065: 'newNormal' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 17 error C2065: 'newNormal' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 19 error C2065: 'newNormal' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 53 error C2065: 'newNormal' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 55 error C2065: 'newNormal' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 57 error C2065: 'newNormal' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 10 error C2065: 'newD' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 21 error C2065: 'newD' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 59 error C2065: 'newD' : undeclared identifier d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 1 error C2061: syntax error : identifier 'Vector' d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 12 error C2061: syntax error : identifier 'Vector' d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 36 error C2061: syntax error : identifier 'Vector' d:\erasmus\301cr\porfolio\mymath\include\angleaxis.h 19
Error 40 error C2061: syntax error : identifier 'Vector' d:\erasmus\301cr\porfolio\mymath\include\quaternion.h 16
Error 50 error C2061: syntax error : identifier 'Vector' d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 3 error C2061: syntax error : identifier 'Point' d:\erasmus\301cr\porfolio\mymath\include\plane.h 15
Error 14 error C2061: syntax error : identifier 'Point' d:\erasmus\301cr\porfolio\mymath\include\plane.h 15
Error 23 error C2061: syntax error : identifier 'Point' d:\erasmus\301cr\porfolio\mymath\include\vector.h 37
Error 25 error C2061: syntax error : identifier 'Point' d:\erasmus\301cr\porfolio\mymath\include\vector.h 76
Error 26 error C2061: syntax error : identifier 'Point' d:\erasmus\301cr\porfolio\mymath\include\vector.h 77
Error 27 error C2061: syntax error : identifier 'Point' d:\erasmus\301cr\porfolio\mymath\include\vector.h 79
Error 28 error C2061: syntax error : identifier 'Point' d:\erasmus\301cr\porfolio\mymath\include\vector.h 80
Error 30 error C2061: syntax error : identifier 'Point' d:\erasmus\301cr\porfolio\mymath\include\vector.h 81
Error 31 error C2061: syntax error : identifier 'Point' d:\erasmus\301cr\porfolio\mymath\include\plane.h 15
Error 52 error C2061: syntax error : identifier 'Point' d:\erasmus\301cr\porfolio\mymath\include\plane.h 15
Error 11 error C1903: unable to recover from previous error(s); stopping compilation d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 22 error C1903: unable to recover from previous error(s); stopping compilation d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
Error 60 error C1903: unable to recover from previous error(s); stopping compilation d:\erasmus\301cr\porfolio\mymath\include\plane.h 13
a jeżeli zamiast tego kawałka kodu powyżej zrobię :
class Plane;
class Quaternion;
to znowu mam takie błędy :/ :
Error 11 error C2228: left of '.D' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 67
Error 9 error C2228: left of '.C' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 67
Error 21 error C2228: left of '.C' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 23 error C2228: left of '.C' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 7 error C2228: left of '.B' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 67
Error 17 error C2228: left of '.B' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 19 error C2228: left of '.B' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 5 error C2228: left of '.A' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 67
Error 13 error C2228: left of '.A' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 15 error C2228: left of '.A' must have class/struct/union d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 4 error C2027: use of undefined type 'Plane' d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 67
Error 6 error C2027: use of undefined type 'Plane' d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 67
Error 8 error C2027: use of undefined type 'Plane' d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 67
Error 10 error C2027: use of undefined type 'Plane' d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 67
Error 12 error C2027: use of undefined type 'Plane' d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 14 error C2027: use of undefined type 'Plane' d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 16 error C2027: use of undefined type 'Plane' d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 18 error C2027: use of undefined type 'Plane' d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 20 error C2027: use of undefined type 'Plane' d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
Error 22 error C2027: use of undefined type 'Plane' d:\erasmus\301cr\porfolio\mymath\mymath\point.cpp 70
a znowu jak zrobie samo :
class Quaternion;
i wykomentuje funkcje które używają plane to wszystko działa.
EDIT: jeszcze jest jedna opcja i to chyba to o co chodziło : jeżeli napiszę :
#include "quaternion.h"
class Quaternion;
to znowu wysypuje błędy (mniej więcej o point i vector - undefined identifier)
Nie rozumiem tego :/