C++ code: 将程序的输出,保存到txt文档中,且每35个数,自动换行

  // write the predicted score into txt files
      ofstream file("/home/wangxiao/Downloads/caffe-master/wangxiao/bvlc_alexnet/predict_score.txt",ios::app);
      if(!file) return;
      static int nu = 0;
      if(nu < 35){
        file << bottom_data[id_tmp] << " " ;
        nu ++;
      } else {
        nu = 0;
        file << " " << endl;  // endl denotes change into next line in the C++ language
      }
      file.close();

上一篇:学习了LINUX下用C语言遍历文件夹,一些心得


下一篇:SilverLight开发系列第3步:制作鼠标跟随效果,顺便熟悉一些基本概念:群组 和 动画