erreur: expected type-specifier before
Bonjour,
J'ai un petit soucis à la compil', mais j'ai beau regarder mon code je n'arrive pas à voir d'où il vient...
Alors voici mon main qui bug :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| #include "MmxObject/MmxObject.hpp"
#include "MmxObject/Point.hpp"
#include "MmxObject/Vector.hpp"
#include "MmxObject/Line.hpp"
#include "DynamixData/DynamixData.hpp"
#include "DynamixObject/DynamixObject.hpp"
#include "DynamixObject/Point/DynamixBasisPoint.hpp"
#include "DynamixObject/Point/DynamixPointOnLine.hpp"
#include "DynamixObject/Point/DynamixInterPoint.hpp"
#include "DynamixObject/Vector/DynamixVector.hpp"
#include "DynamixObject/Line/DynamixLine.hpp"
#include <iostream>
using namespace std;
using namespace dynamix;
int main(){
try{
DynamixData *data = new DynamixData;
DynamixObject *dynP1 = new DynamixBasisPoint(data, "A", 1, 2, 3);
DynamixObject *dynLine1 = new DynamixLine(data, "L", 1, 2, 3, 4, 5, 6);
DynamixObject *dynLine2 = new DynamixLine(data, "M", 2, 3, 4, 5, 6, 7);
DynamixObject *dynP4 = new DynamixInterPoint(data, "D", dynLine1, dynLine2);;
delete(data);
}catch(char *message){
cout << "Problème : " << message << endl;
}
} |
Et voici les insulte du compilo :D :
Code:
1 2 3 4 5 6
| g++ -g -c Main.cpp
Main.cpp: In function «int main()»:
Main.cpp:16: erreur: expected type-specifier before «DynamixInterPoint»
Main.cpp:16: erreur: cannot convert «int*» to «dynamix::DynamixObject*» in initialization
Main.cpp:16: erreur: expected «,» or «;» before «DynamixInterPoint»
make: *** [Main.o] Erreur 1 |
DynamixInterPoint.cpp compile parfaitement.
J'ai l'impression qu'il croit qu'il y a une faute d'orthographe à DynamixInterPoint alors que je ne croit pas
Si j'écrit DynamixBassPoint à la place de DynamixBasisPoint il me dit la même chose pour la ligne 13...
Le fichier de la classe correcpondante est bien inclu et pas de faute d'orthographe apparente...
Quelqu'un a une idée?
Mercid 'avance pour votre aide.
Julie :-o .
Touvé :
Le Problème provenait de la class DynamixInterPoint #ifndef __A__ etait le même pour cette class et pour la classe DynamixBasisPoint.
Merci à ceux qui se sont penché sur le sujet.