火星种萝卜 2008-11-21 03:28:55 请问,我往文件里写数据时程序块如下:
ofstream ff;
AI_VReadChannel(cardID, 1, AD_B_10_V, &AdVoltage); //channel 1
m_graph.PlotXY(shijian,AdVoltage,1);
ff.open("d:\\1.txt",ios::out|ios::app);
ff<<AdVoltage<<4444<<shijian<<endl;
ff.close();
我想把位置4444处换为空格,便于人工阅读空格前后的数据,但是换为空格后程序出错,该怎样处理才能往文件里写空格数据呢?