# anybody using VC++ Express Edition care to help?

This topic is 4092 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

lately I've been getting a sudden explosion of errors all relating to the C++ Standard Library included in VC++ Express Edition. the following comes up EVERY TIME I build a project using stdio.h: M:\Microsoft Visual Studio 8\VC\include\cstdio(37) : error C2039: 'sprintf' : is not a member of 'global namespace'' M:\Microsoft Visual Studio 8\VC\include\cstdio(37) : error C2873: 'sprintf' : symbol cannot be used in a using-declaration M:\Microsoft Visual Studio 8\VC\include\cstdio(40) : error C2039: 'vsprintf' : is not a member of 'global namespace'' M:\Microsoft Visual Studio 8\VC\include\cstdio(40) : error C2873: 'vsprintf' : symbol cannot be used in a using-declaration I have searched for many days trying to find the answer(including googling just about every variation of the above errors) and even asked the folks over at the msdn forums to help. People keep telling me to check if the file is included inside a namespace, but I've tried including it without using namespaces at all, and am still receiving the same errors. does anybody know how I could re-download JUST the C++ standard Library(or can someone at least tell me what installer it gets included in)? I tried re-installing VS today, and that made no difference. I'm about ready to throw in the towel with VC++ and just switch to GCC entirely(which is a drag, because I can't use DirectX with GCC) anybody out there willing to help? the problem seems to be in the folling portion of <cstdio>: _STD_BEGIN using ::size_t; using ::fpos_t; using ::FILE; using ::clearerr; using ::fclose; using ::feof; using ::ferror; using ::fflush; using ::fgetc; using ::fgetpos; using ::fgets; using ::fopen; using ::fprintf; 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 ::sprintf; using ::sscanf; using ::tmpfile; using ::tmpnam; using ::ungetc; using ::vfprintf; using ::vprintf; using ::vsprintf; _STD_END Any help would be greatly appreciated, and thanks in advance. -Wynter Woods(aka Zerotri)

##### Share on other sites
The functions in <cstdio> are in the std namespace.

Edit:
Hmmm... I can't reproduce the errors.

[Edited by - microdot on October 2, 2006 7:30:36 PM]

##### Share on other sites
Try adding std:: before any of those functions you use.

Edit: well, that's what I get for replying and then waiting a couple minutes before I actually post it :)

Edit #2: Actually, are you getting those errors just from including stdio.h? That shouldn't be happening, and those functions should be in the global namespace I think (is that for backwards compatibility?). Anyway, are you getting that in a blank project?

##### Share on other sites
yup, I get them from just including stdio.h, which I thought was very peculiar. I actually went into the VC++ project settings and changed the directories to check a different directory first, and now the only errors I'm getting are template issues, which can be fixed by using some of the built-in functions...although for some reason declaring a std::string with a const char as the constructor argument will result in a compiler error. so I have to find some other way around this. thanks for the replies!

-Wynter Woods(aka Zerotri)

##### Share on other sites

This topic is 4092 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628710
• Total Posts
2984335

• 23
• 11
• 10
• 13
• 14