首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

c的打开文件有关问题

2012-02-26 
c的打开文件问题char str[57]char Fullpath[]{d:\\program file\\同花顺中信金通\\history}char file

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"}; 

热点排行