J
Jean Pierre Hort
Hi,
I am going to write a kind of editor for Linux.
It is one of my first projects so I'm not having much experience.
It work's very good, I can chose a filename, if this file exists text
will be written at the end of this file, if it does not exist this file
will be created.
My problem now is, I get the text of the user which should be written
into the file via "cin >> var". This var will then be written into the
file. But, I can only do one line, when I press enter for making a new
line the text will be send to the cin.
Is there an easy way to put a text with more than one line into a
stringvariable? So that I can press enter more than one time for
creating numerous endls? The input should be ended when entering EOF or
something like that.
Is there an easy way realising that?
Regards
I am going to write a kind of editor for Linux.
It is one of my first projects so I'm not having much experience.
It work's very good, I can chose a filename, if this file exists text
will be written at the end of this file, if it does not exist this file
will be created.
My problem now is, I get the text of the user which should be written
into the file via "cin >> var". This var will then be written into the
file. But, I can only do one line, when I press enter for making a new
line the text will be send to the cin.
Is there an easy way to put a text with more than one line into a
stringvariable? So that I can press enter more than one time for
creating numerous endls? The input should be ended when entering EOF or
something like that.
Is there an easy way realising that?
Regards