Anyone helps me?
what is the output for the following version of reverse()
void reverve() {
int ch;
cin.get(ch);
if(ch != '\n')
reverve();
cout.put(ch);
}
thank u!
it reads a line form std::cin and outputs it in reverse order
So what will appear on screen?
have you tried running the program?
Yes, I've tried. But it announced errors in line "cin.get(ch)". Can u run it and send me ur code?
ok, the problem is that ch should be a char instead of an int
Wow, it ran when I changed int to char. :x. Thanks for ur help. I expect to see u later. :D