c 一行一行都文件
时间:2011-06-12 来源:oayx
void ParseResourcePath()
{
g_vecResourcePath.clear();
wxChar fname[] = "ResourcePath.config";
FILE *fp;
wxChar buf[MAX_PATH] ;
if((fp = fopen(fname, "r ")) == NULL)
{
Logger::getSingleton().logEvent( "ParseResourcePath() - ResourcePath.config cannot find", Errors );
return;
}
//fgets(buf,MAXBLINE,fp);
while (!feof(fp))
{
fgets(buf,MAX_PATH,fp);
g_vecResourcePath.push_back(wxString(buf));
}
fclose(fp);
}
{
g_vecResourcePath.clear();
wxChar fname[] = "ResourcePath.config";
FILE *fp;
wxChar buf[MAX_PATH] ;
if((fp = fopen(fname, "r ")) == NULL)
{
Logger::getSingleton().logEvent( "ParseResourcePath() - ResourcePath.config cannot find", Errors );
return;
}
//fgets(buf,MAXBLINE,fp);
while (!feof(fp))
{
fgets(buf,MAX_PATH,fp);
g_vecResourcePath.push_back(wxString(buf));
}
fclose(fp);
}
相关阅读 更多 +