?? ch01.1.5.1.c
字號:
// #include <iostream>
// #include <fstream>
#include <iostream.h>
#include <fstream.h>
#include <string>
/**
**
stanl@john:d.01 264 : xsh32 ch01.1.5.1.c
**
stanl@john:d.01 267 : cat input_file
Shyly, she asks, "I mean, Daddy, is there?"
**
stanl@john:d.01 265 : a.out
**
stanl@john:d.01 266 : cat out_file
Shyly, she asks, "I mean, Daddy, is there?"
**
**/
int main()
{
ofstream outfile( "out_file" );
ifstream infile( "input_file" );
if ( ! infile ) {
cerr << "error: unable to open input file!\n";
return -1;
}
if ( ! outfile ) {
cerr << "error: unable to open output file!\n";
return -2;
}
string word;
while ( infile >> word )
outfile << word << ' ';
return 0;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -