本文整理汇总了C++中Points::WriteTextFile方法的典型用法代码示例。如果您正苦于以下问题:C++ Points::WriteTextFile方法的具体用法?C++ Points::WriteTextFile怎么用?C++ Points::WriteTextFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Points
的用法示例。
在下文中一共展示了Points::WriteTextFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Format1
/**
* txt to binary
*/
int Format1(int argc, char** argv)
{
assert(argv[1][0] == '1' && argv[1][1] == 0);
if (argc != 4 && argc != 6) {
cout
<< "-- For type 1, read binary file and output txt file [start_line] and [end_line] is optional"
<< endl;
cout << " " << argv[0]
<< " 1 binary_file_in txt_file_out [start_line] [end_line]" << endl;
return -1;
}
Points<DefaultDataTypes> points;
points.LoadPoints(argv[2]);
int start_line = 0;
int end_line = points.size_;
if (argc == 6) {
start_line = atoi(argv[4]);
end_line = atoi(argv[5]);
}
points.WriteTextFile(argv[3], start_line, end_line);
return -1;
}