1

ubuntu linux vmPlayerで動作するflex-bisonプロジェクトがあります。問題は、bison ファイルで int-string キャスト用に文字列と int のマップを使用しようとしているのですが、ファイル extra.y でエラーが発生することです。

   %{   
   #include <stdio.h> 
   #include <stdlib.h>  
   #include <string.h>
   #include <map>
   using namespace std; 
   int yylex();   
   void yyerror(const char*);
   map<string,int> vars;   //ERROR

エラーが表示されます:

 extra.y:9:12: error: ‘string’ was not declared in this scope
    map<string,int> vars;

..ヘルプ ??

4

0 に答える 0