下面的代码编译能通过,可是str的输出结果是fd.cFileName的地址,而不是值。请问怎么改动?
#include "stdafx.h"
#include <iostream>
#include <windows.h>
using namespace std;int _tmain(int argc, _TCHAR* argv[])
{ WIN32_FIND_DATA fd; HANDLE hFile=FindFirstFile(argv[0],&fd); sprintf_s(str,"%d",fd.cFileName);cout<<str<<endl; system("pause");
return 0;
}