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();

上一篇:李沐大神的动手学深度学习的创建和使用EC2实例


下一篇:Jupyter python2和python3切换以及更换路径