|I know my question title is not very self explanatory , so please allow me to explain: I made an algorithm for an AI and at first i tried writing it in vbs, and then i tried batch and now i've finally decided to move to c++ instead. So here is how i did it in batch:|
set /p input=What do you want to search the database for?
set input=%input:What is an=an%
findstr /ilc:"%input%" "database.txt" || echo No Information Found
How do i do this in c++? my goal is that I type something in to my program and it will search the file for it and if it finds a line that contains it it displays the whole line, instead of that though, what it will do is if it finds the users input in the database it will then respond with the, or one of the corresponding responses to that which is found in the database, I am using Orwell Dev C++ 5.6.1