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'
char Fullpath[]={"d:\\program files\\同花顺中信金通\\history"};