What on earth is wrong in this code?
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
int money;
string prompt("Input how much pence without the pence sign you want to input\n"),
input;
cout << "Input how much pence without the pence sign you want to input\n";
if ( money == 50 ) {
cout << "Enter the key number of the drink you want" << endl;
cout << "1 Coke \n 2 Diet Coke \n 3 Fanta \n 4 Sprite" << endl;
}
getline( cin, input);
cout << "Please wait, your product is vending" << endl;
if ( input > 9 ) {
cout << "Invalid input" << endl;
}
else if ( money > 50 ) {
cout << "Enter a key number of the drink you want" << endl;
}
cin >> input;
}
if ( input ) {
cout << "Invalid input" << endl;
{
if ( input.length() == 2 ) {
cout << "Please wait, your product is vending" << endl;
}
else if ( input.length() < 10 ) {
cout << "Please wait, your product is vending and here is your" << input - 50 << " change" << endl;
}
return 0;
}
And the error message was.....
no match for 'operator>' in 'input > 9'