i am a newbie on C++,since i have searched so many books and question ppl asked here, but i can't solve this problem yet, i need some help.does anyone able to help me out
i want to array the txt name 1.txt and save it in 2.txt with new array form.
vocabulary1
other form of vocabulary
definition1......................single line
definition2.....................single line
definition3.....................single line
definition#.....................single line
</>
vocabulary2
form of vocabulary2
............................and so on, many words continue like that
with </>separate from 2 vocabularies
the request is array the txt1 into like this:
vocabulary1|other form of vocabulary1
definition1......................<BR>definition1......................<BR>(all in one line)
</>(one line with it separate two different vocabularies)
vocabulary2|form of vocabulary2(one line)
All definitions combine into one line,and put<BR>to connect each other, the line with </> not changed.
i know how to open a file and use getline(). with getline(input,str,'\n')
i only able to copy first line of it, or use getline(input,str,'\0') copy all words inside it.
that's not what i want to get, i just want to get a function to solve the problem with array them in a right way. (doesn't need to write the head of program. sorry for my broken language.
Thanks in advange. have a good day everyone.