Alright, so I'm trying to make a simple brief choice based text game for my final assignment (Yep, finals week for me. Woohoo...) However, I could use assistance with something as I'd been behind in the class a lot...
Here is what I have so far:
#include <iostream>
#include <ctime>
using namespace std;
int main () {
return 0;
}
{
system("cls");
int choiceOne_Path;
cout << "# What would you like to do?" << endl;
cout << "\t >> Enter '1' to follow the Chief?" << endl;
cout << "\t >> Enter '2' to find your own path?" << endl;
retry:
cout << "\nEnter your choice: ";
cin >> choiceOne_Path;
if(choiceOne_Path == 1)
}
First, I didn't actually do the second part of this after return 0;, I included that here because I'm trying to replicate that in a way, yet I'm stumped.
What want to do for this whole thing is simple:
#1. Prompt the user with two or three different choices.
#2. Based on whatever choice they pick, they're prompted to click to continue and are proceeded to another set of choices based on whatever they do pick. And essentially repeat that process until they reach the end.
> as I'd been behind in the class a lot
Why is that?
http://www.cplusplus.com/forum/general/246968/
"I only got this far from having a tutor show me what to do."
That was only a week ago, and you were deep underwater with a simple F->C program.
> First, I didn't actually do the second part of this after return 0;
It doesn't look like you did the first part either, what with the "<insert xxx here>" boilerplate code.
TBH, the best thing for you is to fail the course and try much harder next time.
Well, thank you for reminding me of something I'm more than aware of buddy. Thank you for your impotent words.
You're free to believe what you want, but I've been busting ass to catch up in this stuff because I'm not going to just give up and accept FAILING a class like you want me to without putting up SOME kind of effort in the end. I've pulled my grade up drastically with the assistance of others and my teacher reflecting back on previous lessons.
And it annoys me that you're really going to say that you think I copied a simple c++ heading and a few measly cout statements.
if(choice ==1)
{
cout anothermenu
cin anotherchoice //depending on what you do, you may need more than 1 choice input variable
if(choice == 1)
{
repeat nested until bored
}
elseif (choice == 2) //inner choice
{
etc
}
}
elseif (choice == 2) //outer choice
{
etc
}
however this style, while it is simple and will work, is going to lead to a big wad of difficult to manage code, often with redundancy where the same choice is repeated (say sub choice level 1 is the same for 1 and 2, then you have to repeat it with this approach).
There are much better ways to do this but you are not there yet.