次のコードで何が問題なのか分かりません。 WordStore.cxxは、空の関数本体を持つように同様に定義されています。コンパイラはsemstore.h関数の定義で "expected") ""という文句を言います。私はXCodeを使用しています。 ちなみに、古代(10歳以上)のコードを最新のC++コンパイラでコンパイルするためにアップグレードしています。Parse issue expected ')' C++のコンパイルエラー
/* WordStore.h */
#ifndef WORD_STORE_H
#define WORD_STORE_H
class WordStore
{
public:
WordStore();
};
#endif
// semclass.h
#ifndef SEMCLASS_H
#define SEMCLASS_H
#include <iostream>
using namespace std;
void ReadSemRules(std::istream& stream, WordStore& ws);
#endif
// semclass.cxx
#include <iostream>
#include <string.h>
#include "WordStore.h"
#include "SemClass.h"
using namespace std;
void ReadSemRules(istream& stream, WordStore& ws)
{
}
これらは、すべてのファイルです。あなたは何について話していますか? @ xaxxon –