"David Sobey" <da************ *************** *******@hotmail .com> wrote in
message news:3f******@d news.tpgi.com.a u...
sorry im only a beginner so i thought my errors would have been bleedingly
obvious. first, is says ifstream is ambiguous, getline doesn't accept
"Buffer", i think it needs a char pointer, also, it doesnt recognise the
<< operator.
sorry i can't be more specific, im having trouble interpreting the
compiler messages. They are all compile time errors.
cheers
dave
Okay. First off, you are using the *old* standard library. That is, the
header files with a '.h' at the end are from a previous version of the
library and things there don't necessarily work like the new ones do. Help
will be easier to come by if you use the new version (without the '.h').
Full error messages are also good.
As for as the messages you are getting:
ifstream is ambiguous could mean that it is finding more than one class
called ifstream or that there is more than one ifstream constructor that
takes an char * as the fist argument (with differing default arguments)
getline doesn't accept "Buffer", as you suspect, does need a char pointer,
and probably a buffer size too.
it doesnt recognise the << operator - possibly also complaining about
getting a string instead of a null terminated character array. If this is
the case, it should take Buffer.c_str().
As far as outputting the first character goes, and provided the string isn't
empty, Buffer[0] wil return the first character in the string.
Don't stay up for too many days in a row.
Tom