Trying to develop a very simple A.I. chat bot. You know, like one of those old school chat bots that you could type responses, and the bot would spit out text... but I'm having a hard time.
I have lots of questions, but I'll try to just ask a few 'main' ones first.
1. How do you accept user input that is more than one character long? I've been using getchar() for everything, but it'd be nice if I could have the user actually type a few words, and it all fit into one variable that I could then dissect.
2. How do I make the program to constantly wait for input? Meaning, the user opens the program, it says something, waits for input. Upon pressing enter, the program says something based on the input, then waits for input again... and again, and again. I keep getting either infinite loops or errors.
That's pretty much it for now, if I could just get the program to do the above, I'd be a lot farther off than I am. Thanks for any and all help.