Because i am a beginner on C++ i cannot do this myself.
Maybe it is difficult, but you should be able to do it, there are many things in life that are much harder. Don't be afraid of failure as it is the best teacher there is.
Lets go to the requirements first.
What it would be doing: read a single line from a file as string.
The most important questions are:
* where to start
* when to stop
The second point is most difficult as there can be 2 conditions when to stop
1) You detected end of line
2) The string buffer is full.
This gives the additional question, how do we know it succeeded or failed?
And yes, how do you want to handle the end of line character?
1) included in the string
2) not included in the string
That are a lot of questions to be answered, but none is very difficult.
Given the above information, how would a call to the readln function look like?
What parameters does it have?
What return value(s)?
Can you provide three as real as possible calls to the readln() ?
1) that works OK,
2) where a buffer full error is encountered
3) reading an empty line from file
RobJohn Fitzgerald Kennedy: We will go to the moon. We will go to the moon and do other things, NOT because they are easy but because they are HARD.