ライブラリをコンパイルしようとしていますが、実行make中に次のエラーの多くが発生します。
error: conflicting declaration ‘int x’
error: ‘x’ has a previous declaration as ‘Text* x’
コードは次のとおりです。
.
.
.
class Text;
class Code {
private:
std::vector<std::string> *tokens;
std::vector<std::string> *compounds;
std::vector<std::string> *compound_xml;
std::vector<std::string> *compound_xml_action;
void set_helper(Text *x, int a, int b, int c, std::string field, std::string value);
std::string itoa(int x);
public:
Code();
~Code();
int analyse_code(Text *x, std::string c, int x, int y, int z);
int print(Text *x, std::string c, int x, int y, int z);
int is_class(Text *x, std::string c, int x, int y, int z);
int is_class2(Text *x, std::string c, int x, int y, int z);
int not_class(Text *x, std::string c, int x, int y, int z);
.
.
.
analyse_code関数\メソッドでは、変換するint x必要がありますか、それともエラーの原因ですかint a?int wtv
ライブラリの作成者は多くの関数でText* xandを使用しているので、int xおそらく彼は自分が何をしているかを知っており、ポインターが である可能性があるとint思いました.
無関係: ライブラリは、中国語のテキスト分析エンジンである Adso です。