NEGATIVE_STOCK_PRICE:
cout << "\nPlease enter the desired stock price: " << workCurrency << ends;
cin >> putOption0.S;
if (!(cin >> putOption0.S) || (putOption0.S < 0))
{
cout << "Think you typed in the wrong number please try again" << endl;
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(), '\n');
goto NEGATIVE_STOCK_PRICE;
}
The problem is that I cannot use - if (!(cin >> putOption0.S) || (putOption0.S < 0)) - properly. If I put a negative number, I will need to put it twice. If I use - if (!(putOption0.S) || (putOption0.S < 0)) - my console goes nuts if I use a letter ...