Jump to content

Small Question

Go to solution Solved by lubblig,

I'm new at this, so don't laugh if this question is a bit nooby

 

So when I'm making a command application, I can make it ask me a question, then I'll be able to answer it and it'll give me a response. But that's it. What I'm wondering is, how do I make it keep going? For example, it will ask me left or right, I'll put in left, then it will ask me my favorite color or something and so on and so forth.

 

Let me take a guess though, is this how I would do it?

This would be the basics.

v27LGnn.png?1

 

It could be done more advanced and I'm unsure of what you want to do with the answers. So if you explain that I might be able to help you.

 

You could do it more advanced and that requires less code. But for now I think it'll be easier for you to understand this first. (If you want to research it on your own, you could search for and learn more about arrays and loops.

I'm new at this, so don't laugh if this question is a bit nooby

 

So when I'm making a command application, I can make it ask me a question, then I'll be able to answer it and it'll give me a response. But that's it. What I'm wondering is, how do I make it keep going? For example, it will ask me left or right, I'll put in left, then it will ask me my favorite color or something and so on and so forth.

 

Let me take a guess though, is this how I would do it?

 

 

post-251457-0-46203100-1451770714.png

Link to comment
https://linustechtips.com/topic/518992-small-question/
Share on other sites

Link to post
Share on other sites

-snip-

 

So I am a bit confused on what you are asking. You are making a console application, right? From how I read this, you are trying to ask the user multiple questions and get multiple responses. Is this correct? 

 

Also Is this C++?

 

Let me know. I'm happy to help if I can. 

Windows 10 is now MSX! http://linustechtips...ndows-10/page-6 ....................

Link to comment
https://linustechtips.com/topic/518992-small-question/#findComment-6896033
Share on other sites

Link to post
Share on other sites

It's C#

 

Basically, if you've ever read one of those books where it asks you do you go to the path on the right, or the left. And it will say something like, if you go to the left, skip to page 130 or something along those lines.

 

That's basically what I'm trying to do. It's more for understanding the concept more then anything else. I just need to know how you would go about doing this.

Link to comment
https://linustechtips.com/topic/518992-small-question/#findComment-6896162
Share on other sites

Link to post
Share on other sites

I'm new at this, so don't laugh if this question is a bit nooby

 

So when I'm making a command application, I can make it ask me a question, then I'll be able to answer it and it'll give me a response. But that's it. What I'm wondering is, how do I make it keep going? For example, it will ask me left or right, I'll put in left, then it will ask me my favorite color or something and so on and so forth.

 

Let me take a guess though, is this how I would do it?

This would be the basics.

v27LGnn.png?1

 

It could be done more advanced and I'm unsure of what you want to do with the answers. So if you explain that I might be able to help you.

 

You could do it more advanced and that requires less code. But for now I think it'll be easier for you to understand this first. (If you want to research it on your own, you could search for and learn more about arrays and loops.

Spoiler

System:

i5 3570k @ 4.4 GHz, MSI Z77A-G43, Dominator Platinum 1600MHz 16GB (2x8GB), EVGA GTX 980ti 6GB, CM HAF XM, Samsung 850 Pro 256GB + Some WD Red HDD, Corsair RM850 80+ Gold, Asus Xonar Essence STX, Windows 10 Pro 64bit

PCPP:

http://pcpartpicker.com/p/znZqcf

 

Link to comment
https://linustechtips.com/topic/518992-small-question/#findComment-6896208
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×