> I was looking for some hints
The hint was 'divide and conquer'. In retrospect, the post would perhaps have been better if had given just the declarations of the three functions after that.
> I didn't understand the behavior of "if( !( stm >> field ) )"
stm >> field
tries to extract
and returns a reference to
. If the attempt to extract
would be in a failed state.
// if the stream input failed, indicate failure by returning an empty string
if( !( stm >> field ) ) return "" ;
> ... the ">>" operator ... makes my problem simple
C++ now has
If your implementation has
, you could just use that.
> Inside the for-loop "for( int i = 0 ; i<=column ; ++i )" it had to be a "<=" operator in the middle to find the right column.
There is one column less in the line once you cut the marker from the line.
With 'the marker can now be anywhere in the line.' and
'cuts the marker of and returns the rest of the line.'
what would happen if the marker was originally after
the required column?