Sign in to follow this  

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this