开发者

error C3861 : identifier not found, error C2065: undeclared identifier

开发者 https://www.devze.com 2022-12-17 00:13 出处:网络
I\'m new to Visual Studio Express 2008. I succeeded in executing the C++ compiler from command line on my single cpp file, after i had to add some path in the %include% to .. .NET\\console\\Templates\

I'm new to Visual Studio Express 2008. I succeeded in executing the C++ compiler from command line on my single cpp file, after i had to add some path in the %include% to .. .NET\console\Templates\1033 for the stdafx.h definition fi开发者_开发百科le (why do i need to do that, i would have thought the installer would put everything i need... ??) and it worked, but now i get the error C3861 for 'printf', 'sprintf', 'fopen'... and also error C2065 for 'FILE', 'fpIndex', 'fpData'... Both errors seem to be associated with a namespace problem! I have no idea on what to do about a namespace, when i tried the command suggested for these errors on MS website using namespace std; i got one more error saying "a namespace with this name does not exist" ?

i only have these few includes and the code

#include "stdafx.h"
#include <windows.h>
#include <time.h>
#include <process.h>
#include <stdlib.h>
#include <malloc.h>


You're missing a library you need for those functions. Try adding #include < stdio.h>

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号