#include
#include
using std::cout;
using std::endl;
using std::cin;
using std::fstream;
using std::ofstream;
using std::ifstream;
using std::ios;
int main(void)
{
ifstream in; // 입력 스트림
ofstream out; // 출력 스트림
char cr[20];
in.open("input.txt"); // 파일열기
if(!in)
{
cout<<"error#1 : Not input file open!"< return 1;
}
in >> cr; // 읽어서 cr에 넣음
out.open("output.out");//파일생성됨
if(!out)
{
cout<<"error#2 : Not output file open!"< return 1;
}
for(int j=0; j<10; j++) //파일출력
{
out << cr[j]<<"
";
}
in.close(); // 열었으니 닫아줌.
out.close();
return 0;
}
# by Ego君 | 2006/06/06 17:38 |
컴퓨터 |
트랙백 |
덧글(1)