CCS5.5 txt文件读写 不了

[复制链接]
1706|3
 楼主| DSP_推粪球 发表于 2016-3-9 09:32 | 显示全部楼层 |阅读模式
    FILE *fp;
    fp= fopen("E:\\CCS5.5 workplace\\TMS320C6748\\Compressout.txt","w");
//    for(int i = 0; i < cout + 6*lenth; i++ ){
//            int c = unsignedByteToInt(output[i]);
//        fprintf(fp,"%d \n", c);
//            //char ch[2]={0};
            //ch[0]=output[i];
            //ch[1]=output[i+1];
            //int t = Byte2ToInt32(ch);
       // printf("%d",t);
//    }

    fprintf(fp,"%d \n", a[8]);
    if(fp==NULL)
    {
     printf("Not Open \n");
    }
    fclose(fp);
相应的代码段如上,但是就是操作不了文件写不出数据,哪位大神知道这是为什么啊?  谢谢了
zhangmangui 发表于 2016-3-9 22:37 | 显示全部楼层
你在指定的目录下别新建txt文件    看看执行fopen后有没有自动创建
zhangmangui 发表于 2016-3-9 22:38 | 显示全部楼层
写入的a[8]是什么
baimiaocun2015 发表于 2016-3-9 22:49 | 显示全部楼层
这个再看看有没有相关的内层函数的没有定义好的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

6

主题

20

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部