2016-10-11 6 views
0

次のコードで何が問題なのか分かりません。 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) 
{ 
} 
+0

これらは、すべてのファイルです。あなたは何について話していますか? @ xaxxon –

答えて

3

あなたがm&の間、あなたのプログラムの中で浮遊印刷できない文字があります。

https://godbolt.org/g/gAAoGn

void ReadSemRules(std::istream& stream, WordStore& ws); 
          ^^ 
+0

ああ、それは理にかなっています。すべての入力ファイルを再フォーマットする必要があります。 –