This topic has not yet been rated - Rate this topic

<cstdio>

Defines the macros traditionally defined in the Standard C library header <stdio.h>.

#if <TRADITIONAL C HEADERS>
   #include <stdio.h>

#undef clearerr
#undef feof
#undef ferror
#undef getc
#undef getchar
#undef putc
#undef putchar

namespace std {
   using ::fclose; 
   using ::feof;
   using ::ferror; 
   using ::fflush; 
   using ::fgetc;
   using ::fgetpos; 
   using ::fgets; 
   using ::FILE;
   using ::clearerr; 
   using ::fopen;
   using ::fprintf; 
   using ::fpos_t;
   using ::fputc; 
   using ::fputs;
   using ::fread; 
   using ::freopen; 
   using ::fscanf;
   using ::fseek; 
   using ::fsetpos; 
   using ::ftell;
   using ::fwrite; 
   using ::getc; 
   using ::getchar;
   using ::gets; 
   using ::perror;
   using ::putc; 
   using ::putchar;
   using ::printf; 
   using ::puts; 
   using ::remove;
   using ::rename; 
   using ::rewind; 
   using ::scanf;
   using ::setbuf; 
   using ::setvbuf; 
   using ::size_t;
   using ::sprintf;
   using ::sscanf; 
   using ::tmpfile; 
   using ::tmpnam;
   using ::ungetc; 
   using ::vfprintf; 
   using ::vprintf;
   using ::vsprintf;
}
#endif

Including this header also ensures that the names declared with external linkage in the Standard C library header are declared in the std namespace. In this implementation, the names may or may not also be declared in the global namespace, depending on the specific translation environment.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.