点云数据处理
- 格式:docx
- 大小:21.91 KB
- 文档页数:4
c++对txt文件的读取与写入/* 这是自己写程序时突然用到这方面的技术,在网上搜了一下,特存此以备后用~
*/ #include
#include
#include
using namespace std; i
nt main(){ char buffer[256];
ifstream myfile ("c:\\a.txt");
ofstream outfile("c:\\b.txt");
if(!myfile){ cout << "Unable to open myfile";
exit(1); // terminate with error }
if(!outfile){
cout << "Unable to open otfile";