You are here:

C++/Hello, Rai on io input..

Advertisement


Question
Just as there is a way to get the next character value from a file
ch=getch();

last week i've seen that there was a way to go back a character.

please, can you help me out?

Answer
Hi James,
 Please read the man pages for
      int fputc(int c, FILE *stream);
      int fputs(const char *s, FILE *stream);
      int putc(int c, FILE *stream);
      int putchar(int c);
      int puts(const char *s);
      int ungetc(int c, FILE *stream);
I guess that you are involved in some kind of parsing activity. If you need any information, please let me know.

Regards,
RaiD

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Dharmender Rai

Expertise

I can answer general and system level C/C++ questions.

Experience

I have 5 years of experience in C++.

©2016 About.com. All rights reserved.