@dutch,
thank you for your answer.
I have a question, could you explain me what those lines do?
1 2 3
|
for (char ch; f.get(ch); )
{
if (ch == "<body>"[i])
|
How can I check if a char variable is "<body>"? I don't understand it, probably it's connected with this [i] but I've never seen or used this combination so I would be very grateful if you could explain this to me.
Also, when I changed the function looking for BodyTag as you adviced, it still returns in my program -1, as if there were no body tags.
I just added at the end of main(), but before closing the file line:
|
cout << GetBodyPosition(in_file);
|
and it returns -1 every single time... But as you said, it should return 27...
I don't know what is wrong or what I do not understand.
If you or someone could look at my problem once more, I would be more than pleased.