读书人

c的打开文件有关问题

发布时间: 2012-02-26 20:19:44 作者: rapoo

c的打开文件问题
char str[57];
char Fullpath[]={"d:\\program file\\同花顺中信金通\\history"};
char file[7]={"600000"};
FILE *fp1;
strcpy(str,Fullpath);
strcat(str,"\\shase");
strcat(str,"\\min5\\");
strcat(str,file);
strcat(str,".mn5");
SetDlgItemText(IDC_STATI,str);
if((fp1=fopen(str,"rb"))==NULL)
{printf("can't open the file!");
exit(0);
代码这样写感觉没错,但是文件就是没办法打开,不知道怎么回事,请高手help一下~

[解决办法]
晕死,把我看晕了,路径写错了,少了个'S'

C/C++ code
char   Fullpath[]={"d:\\program files\\同花顺中信金通\\history"}; 

读书人网 >C语言

热点推荐