我目前正在尝试做作业,并且我正在尝试首先编译我的东西(.h 文件中的类头,以及 .inl 文件中的空定义(我正在使用类型名模板) )。
我收到此错误:
error: expected constructor, destructor, or type conversion before ‘*’ token
这是我的 .h 文件:http: //ideone.com/dm3Bp
这是我的 .inl 文件:http: //ideone.com/5FBep
我正在尝试在 .inl 文件的末尾创建一个节点(在这些文件中称为 Noeud)。显然,我不能从 E 型数据数组中获取值...
错误就在方法定义之前:
Noeud * Arbre<E>::_auxPereSym(E *tabS, int debut, int fin, E **ptr, int &card) throw (std::bad_alloc)
我在其他线程中读到返回类型应该是 Arbre< E >::Noeud 因为 Noeud 是我的类 Arbre 的嵌套结构......但不幸的是,我无法更改头文件......
有什么想法吗?
感谢您的时间和帮助。
注意:如果需要翻译,请告诉我,这是法语作业。