菜鸟问题 请高手不吝赐教 在线等 急!!! 我用Tree Control显示文件列表,用_getcwd函数时,总是提示“error C2065: '_getcwd' : undeclared identifier” 难道使用这个函数需要头文件吗,我只剩下这个问题没有解决了,请各位告诉我问题出在哪,该怎么改啊,成分感谢,在线等!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 #include <direct.h>#include <stdlib.h>#include <stdio.h>void main( void ){ char buffer[_MAX_PATH]; /* Get the current working directory: */ if( _getcwd( buffer, _MAX_PATH ) == NULL ) perror( "_getcwd error" ); else printf( "%s\n", buffer );} msdn中有_getcwd的帮助 你可以看看#include <direct.h>#include <stdlib.h>#include <stdio.h>其中上面的例子就是msdn中的 包含了这三个头文件 http://msdn2.microsoft.com/en-us/library/sf98bd4y(VS.80).aspx 在线等 急急急! 生成.exe VC使用COM 程序运行出错,请各位帮忙看一下是哪里出错了。 vc6.0下编译DLL为什么没有生成.lib和.dll文件? 请教入门问题 完成端口客户端断开问题, 急!!!!!!!! 一个rundll32启动的进程/线程如何获知当前用户退出系统、系统关闭的消息呢? 无聊 VS2010制作【复杂的】安装包的问题 SetTextCharacterExtra()不起作用 SDI程序退出时都会做什么工作? 写数据库,内存会耗进?
#include <stdlib.h>
#include <stdio.h>void main( void )
{
char buffer[_MAX_PATH]; /* Get the current working directory: */
if( _getcwd( buffer, _MAX_PATH ) == NULL )
perror( "_getcwd error" );
else
printf( "%s\n", buffer );
}
#include <direct.h>
#include <stdlib.h>
#include <stdio.h>
其中上面的例子就是msdn中的 包含了这三个头文件