stringstream未在此范围内声明

ang*_*ela 5 c++ stringstream

我遇到了stringstream.my visual studio的问题,linux g ++也无法理解stingstream.我添加了sstream但它没有解决任何问题.我以前一直在使用它,现在真的不知道它有什么用呢?

#include <sstream>
#include <stdlib.h>
#include "SymbolTable.cpp"
#include "setjmp.h"
using namespace std;
jmp_buf *bfj;
int TOP , SP=3 ;
struct types{int int_val;float float_val;char char_val;bool bool_val;};

types DS[6400];
int main(){
...//some code here
label38 : stringstream s;
label39 : bfj = (jmp_buf *)"label65";
label40 : longjmp(*bfj,1);;
label41 : goto label43;
label42 : TOP=SP;
//some code here
}
Run Code Online (Sandbox Code Playgroud)

我正在编写一个编译器,所以代码是输出,这就是为什么它可能会有点奇怪.

Ama*_*9MF 11

如果包含,#include <sstream>那么您还必须通过以下方式引用该类:

std::stringstreamusing namespace std;在使用前声明.

如果您发布更多信息,我们可以提供更详细的帮助.