Erreur lors de création de class
Code:
1 2 3 4 5 6 7 8 9 10 11
|
#include <iostream.h>
class Point3f {
public:
Point3f(float inx,float iny,float inz);
private:
float x;
float y;
float z;
} |
Code:
1 2 3 4 5 6
|
#include "Point3f.h"
Point3f::Point3f(float inx,float iny,float inz){
x = inx; y = iny; z = inz;
} |
Citation:
D:\projects\C++\OPENGL\testure\Point3f.cpp:3: error: new types may not be defined in a return type
D:\projects\C++\OPENGL\testure\Point3f.cpp:3: note: (perhaps a semicolon is missing after the definition of `Point3f')
D:\projects\C++\OPENGL\testure\Point3f.cpp:3: error: return type specification for constructor invalid
Process terminated with status 1 (0 minutes, 12 seconds)
2 errors, 1 warnings
je ne comprends pas l'erreur Une classe avec comme seule methode le constructeur