I'm working on an assignment which I have to first read in a char type-output it, then read in a int type...
This is some of what I coded (btw i just started coding so please no negative comments):
Code:
char nextchar;
int nextint;
in_stream.get(nextchar);
while (! in_stream.eof( ))
{
if (nextchar != 'S')
{
out_stream.put(nextchar);
in_stream.get(nextint);
}
With the code like that I keep getting this error:
"error C2664: 'class std::basic_istream<char,struct std::char_traits<char> > &__thiscall std::basic_istream<char,struct std::char_traits<char> >::get(char &)' : cannot convert pa
rameter 1 from 'int' to 'char &'"
Can someone PLEASE help me out with this...
Thanks in advance.