C++ CopyOrCut/Paste from text document

:D Hello everyone,

I am making a program where the program copy the first line on the existing text document and paste to textbox, and then copy the text on second line on the same existing text document and paste again to a textbox., until the program done copying the last line text on the text document and paste in the textbox and it stop,..

a text documents is filled with text.. like this

fflaskjf/f8432432/adfl/*^
f324o8fg/243os8/ay45/6&^
54362/123vsafa/(*7


I would greatly appreciate any help offered because I am a beginner.

Thanks,
apelyido271
Try creating a File class (if you don't know about classes yet, read about it on our reference pages.)

In the class, include methods that allow you to open a file (preferably in the constructor) and a method to read the sequence of characters in the current line. Store the characters read in an std::vector<std::string>. Depending on how you want to implement this and what OS you are using, you can use the character data in the vector to output to a text box. Then, you can use the file stream (input or bidirectional file stream) to output spaces where the characters were. There are ways to output nul characters, but I don't know the details of this as (I think) it depends on your OS... ?
Topic archived. No new replies allowed.