Hello everyone.
my question involves casting and c++ strings/
I am reading a file that consists of a sentence.
when it is read when/if I come upon letter"C", I need to change it to "C++".
I thought it would be a snap until i became stuck. can some one take a look?
thanks
Bonnie
Code:char ch;
ch = infile.get();
while ( ch != EOF )
{
if (strcmp(ch,"C")=0)
cout << "C++";
else
ch = infile.get();
cout << ch;
ch = infile.get();
}
cout << endl;
return 0;
}