我正在尝试使用头文件sstream.h
下面是我的代码段
#include <iostream>
#include <string>
#include <sstream>
int main ()
{
string mystr;
float price=0;
int quantity=0;
cout << "Enter price: ";
getline (cin,mystr);
stringstream(mystr) >> price;
cout << "Enter quantity: ";
getline (cin,mystr);
stringstream(mystr) >> quantity;
cout << "Total price: " << price*quantity << endl;
return 0;
}
但我收到以下错误
unable to open include file sstream.h
有谁知道我做错了什么?