当我尝试编译以下代码时:
#define BUFSIZE MAX_PATH
//....
TCHAR sz_VolumeName[BUFSIZE] ;//11
HANDLE hSearch ;//12
hSearch = FindFirstVolume(sz_VolumeName , BUFSIZE) ;//13
它给了我错误:
[Warning] assignment makes pointer from integer without a cast
- 第 13 行的问题
这里出了什么问题?
编辑:例如:
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <tchar.h>
#define BUFSIZE MAX_PATH
int main(int argc, char *argv[])
{
TCHAR sz_VolumeName[BUFSIZE] ;
HANDLE hSearch ;
hSearch = FindFirstVolume(sz_VolumeName , BUFSIZE) ;
printf("First Volume Name : %s \n" , sz_VolumeName) ;
FindVolumeClose(hSearch) ;
getchar() ;
system("PAUSE");
return 0;
}