Alrighty, just wondering if anyone can spare a few minutes to help me out a little. Trying to do the finishing touches on a project I've got for tomorrow. My problem is this -
I'm trying to make the user interface a little more appealing instead of it just asking for details. The way I'm going about this is by letting the user choose what they would like the program to do via a number system. I've got a small piece of code I used before to get the user to choose between Yes and No for a random Number generator, and I've tried to alter that code to my needs. I've got two questions here, the first concerning the first piece of code and the second is to why I'm getting these errors lol.
First off heres the start of the Random Number Generator -
for (;;)
{
cout << "Would you like to input a randomly generated input range? Please enter Y or N" << endl;
cin >> choice;
if (choice.at(0) == 'y' || choice.at(0) =='Y')
{ ect ect ect }
break;
}
My first question is regarding the ;; inside the for statement. I can't for the life of me remember why its there, and can't really find anywhere which explains it from searching notes and textbooks.
Secondly, I altered the above code, albeit wrongly haha, and this is what I've currently got -
cout << "Welcome to An Object Oriented Wind Farm Simulator!" << endl;
cout << "What would you like to do out of the following?" << endl;
cout << "1. Run the Simulation only" << endl;
cout << "2. Run the Simulation and generate a report, which can be found in a specific word document?" << endl;
cout << "3. Enter the price of a kilowatt hour" << endl;
cout << "4. End the Program!" < endl;
cin >> choice;
if (choice.at(0) == '1')
{ectectect}
break;
Im battering on with it, but can't honestly figure out what I've done wrong. Any help would be greatly appreciated!
Ryan.