c++中如何读入文件中的数据
1个回答
2011-05-21
展开全部
char strText[1024+1];
typedef int (WINAPI ICEPUB_READFILETOTEXT)( char *strFilename,char *strText,int maxLen);
ICEPUB_READFILETOTEXT *icePub_readFileToText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_readFileToText = (ICEPUB_READFILETOTEXT *)GetProcAddress(hDLLDrv, "icePub_readFileToText");
}
if(icePub_readFileToText != NULL)
{
icePub_readFileToText("D:\\test\\a.txt",strText,1024);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strText);
http://dl.icese.net/dev.php?f=icePubDll.rar 下载
typedef int (WINAPI ICEPUB_READFILETOTEXT)( char *strFilename,char *strText,int maxLen);
ICEPUB_READFILETOTEXT *icePub_readFileToText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_readFileToText = (ICEPUB_READFILETOTEXT *)GetProcAddress(hDLLDrv, "icePub_readFileToText");
}
if(icePub_readFileToText != NULL)
{
icePub_readFileToText("D:\\test\\a.txt",strText,1024);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strText);
http://dl.icese.net/dev.php?f=icePubDll.rar 下载
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询