Hi,
I'm trying to input the title of a movie from the user. Here's the code that's giving me trouble:
typedef char string [100];
string NewTitle;
cin.get(NewTitle);
I'm using MSVC++6 and it keeps giving me the error:
"error C2664: 'class istream &__thiscall istream::get(char &)' : cannot convert parameter 1 from 'char [100]' to 'char &'
A reference that is not to 'const' cannot be bound to a non-lvalue"
I was using plain old cin>>, but my program would freak out whenever I entered whitespace....
I'm pretty sure I've just screwed up the function syntax somehow, so if anyone can spot what I'm doing wrong, I'd appreciate it.
Thanks