Just tinkering around with some code, am very new to C++.
For some reason this error keeps popping up, not just in this program but in other simple ones I've tried as well.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
usingnamespace std;
int a, b, c;
int main()
{
cout << "Have your quadratic in the form ax^2 + bx + c" endl;
cout << "Enter in the value of a and press ENTER" endl;
cin >> a;
cout << a;
return 0;
}
Ah ok, so on line 8, even though there was only one line to output you have to put the greater than symbols either side of an output. Does that count for inputs too?
you have to put the greater than symbols either side of an output
That's not quite the way to look at things. We are not "surrounding" an item with the insertion operator <<. Rather, we are separating each item, when there is more than one.