Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

File Copy in C++

#include<iostream.h>
#include<conio.h>
#include<fstream.h>
#include<stdio.h>
void main()
{
clrscr();
char ch,st[100];
ofstream o("r.txt");
do {
ch=cin.get();
fflush(stdin);
o.put(ch);
} while(ch!='.');

o.close();
ifstream i;
i.open("r.txt");
ofstream k;
k.open("m.txt");

while(!i.eof()) {
i.read((char*)&st,sizeof(st));
k.write((char*)&st,sizeof(st));
cout<<"\n After copying of the file:";
cout<<st; }

getch(); }