I updated MinGW, but it still not work :/ So, I downloaded Codes Block, and now, it gives me this error:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main()
{
string mystr;
float price = 0;
int quantity = 0;
cout << "Enter price: ";
getline(cin,mystr);
stringstream(mystr) >> price;
cout << "Enter Quaintity: ";
getline(cin,mystr);
stringstream(mystr) >> quatity;
cout << "Total price: " << price*quantity << endl;
cin.get();
}
|
C:\Codes\C++\C++ Projects\sstreamCin.cpp||In function `int main()':|
C:\Codes\C++\C++ Projects\sstreamCin.cpp|18|error: `quatity' was not declared in this scope|
I did looked if was some sintax error, ect., looked the tutorial searching for some error I could made, but I diden't find anything :/ Help is appreciated...
And Duoas, thanks for the help, and about the GCC... I not liked it too much because it is text only...
EDIT: >.<"""" I saw the problem...