here's a part from my code
string word;
cin >> word;
string keyword;
while (file >> keyword && keyword != word){}
This searches for a word in a file and if it finds that word (keyword) then it starts a string from there later. It's working perfectly at the moment. My problem is that when the line is
"Julia","2 Om.","KA","1 Om. 4:2"
if I enter word Julia I can not find it and use it for my purposes (just FYI I'm counting it). It works if I search for "Julia","2 since this is where space comes in.
I'd like to know how can I change line
while (file >> keyword && keyword != word){}
so I can see when the text/string CONTAINS that string since at the moment it only finds and accepts it if I enter the WHOLE string perfectly.
EDIT: Also what I have found this far is only strstr, strtok, strcmp. But these fit more with printf than with cout.