Chào các bạn! Vì nhiều lý do từ nay Truyen2U chính thức đổi tên là Truyen247.Pro. Mong các bạn tiếp tục ủng hộ truy cập tên miền mới này nhé! Mãi yêu... ♥

tep c++

Đặt văn bản tại đây...#include

#include

#include

#include

#include

#include

void ghifile1(char ch[])

{

cout

gets(ch);

ofstream ghi(ch,ios::out);

if(!ghi)

{

cout

exit(1);

}

int i=0;

char str[50];

cout

cin.getline(str,50);

while(str[i])

{

ghi.put(str[i]);

i++;

}

ghi.close();

}

void docfile1(char ch[])

{

ifstream docf1(ch,ios::out);

if(!docf1)

{

cout

exit(1);

}

char ch1;

while(!docf1.eof())

{

docf1.get(ch1);

cout

}

docf1.close();

}

main()

{

clrscr();

char ch1[10];

ghifile1(ch1);

cout

docfile1(ch1);

getch();

return 0;

}

Bạn đang đọc truyện trên: Truyen247.Pro

Tags: #saoma90