Ok, let me describe what I have so far and what I want my program to ultimately do. What I have right now is a very rudimentary and hardwired chatbot. This phase of the project has been completed for 3 months now and my interests were drawn into other areas of interests. I am a beginner to intermediate programmer, but I am been at it for 3-4 years off and on.
Now, what I want my program to be able to do at this point is to record conversations and be able build responses to certain statements and questions based on the conversations of others or maybe even the chatbots conversation with you. Lets start this off with a sample...
//and say that the program only knows Hi as a form of salutation... it may then ask this
Chatbot: What does hello mean?
Human: Hello means Hi.
Chatbot: Ok, so hello then =)
Now, this is a very simple example of what I want it to do and I want everything stored in a .txt file in the same directory as the program.. I know how to create the file and append info to it and all, but what I am unsure of is how to read information back on a line per line basis
The text file would look something like this
3. What does hell mean?
4. Hello means Hi.
5. Ok, so hello then. =)
to read line 2 into the program as a string? without reading line 1 and the others? This is the question I would most liked answered... With just this answered I can work around with just this and create something I will be comfortable with, or maybe find better methods out.
I do appreciate any and all time and thought you put into your responses. Thanks in advance.