I have a program that reads in a file and extracts the front of a tag and the end and puts them on their own line, but for some reason it's missing some tags.

If this is my file:
<tag>something</tag><tag>something2</tag><tag>something3</tag><tag>something4</tag><tag>something5</tag>


It would output should look like this:
<tag>something</tag>
<tag>something2</tag>
<tag>something3</tag>
<tag>something4</tag>
<tag>something5</tag>

But sometimes it gives:
<tag>something</tag>
<tag>something2</tag><tag>something3</tag><tag>something4</tag>
<tag>something5</tag>

Is there any reason why this would happen when using find?

when you output it do you use std::endl ??

You'll have to post your code that handles the output. I don't see any "missing" tags, but I do see some missing newlines.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.