jeudi 27 octobre 2016

How to add something to a file line by line in C++?

Let's consider I have this .txt file:

one
two
three

And like to make a file like this from that:

<s> one </s> (1)
<s> one </s> (2)
<s> one </s> (3)
<s> two </s> (1)
<s> two </s> (2)
<s> two </s> (3)
<s> three </s> (1)
<s> three </s> (2)
<s> three </s> (3)

How can I do it?

Aucun commentaire:

Enregistrer un commentaire