I have the following code here and I keep getting an error on line 13 13:21: error: invalid use of incomplete type 'std::stringstream {aka class std::basic_stringstream<char>}'
// Example program
#include <iostream>
#include <string>
using namespace std;
int main()
{
string mystr;
int x;
cout << "Enter any number: ";
getline (cin,mystr);
stringstream(mystr) >> x;
if (x > 0)
cout << "score is positive";
else if (x < 0)
cout << "score is negative";
else
cout << "score is zero";
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.