ocean #505(2007/07/10 17:01 GMT) [ C++ ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#include <iostream> #include <fstream> void convert(const char* input, const char* output) { std::ifstream fin(input); if (fin) { std::ofstream fout(output); std::string s; while (std::getline(fin, s)) { if (s.empty() || s[0] != '#') { fout << s << std::endl; } } } } int main(int argc, char* argv[]) { if (argc != 3) { std::cerr << "usage: input output" << std::endl; return -1; } convert(argv[1], argv[2]); return 0; }
Rating0/0=0.00-0+
[ reply ]
ocean
#505()
[
C++
]
Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]