<sstring> problem
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#include <iostream>
#include <string>
#include <sstring>
using namespace std;
int main ()
{
string myString ("1204");
int myint;
stringstream(myString) >> myint;
float price = 0;
int quantity = 0;
cout << "Enter price: ";
getline (cin, myString);
stringstream(myString) >> price;
cout << "Enter quantity: ";
getline (cin, myString);
stringstream(myString) >> quantity
cout << "Total price: " <<price * quantity << endl;
}
|
when i compile this i get an error: sstring, no such file or directory
why is that?
You meant <sstream>
Topic archived. No new replies allowed.