copy file using c++

ne sebenarnya tugas se….

trnyata baru tau slain bs mengisi file ato view file, trnyata C++ bisa jg buat copy delet n move

ne script buat copy file

class copy {
ifstream orig_file;
ofstream copy_file;
FILE *cp;
char temp[100];
int b;
public :
copy(){}

salin(){
    orig_file.open("tulis.txt");
    copy_file.open("copy.txt");
    cp=fopen("tulis.txt","r+");
    b=sizeof(msg)+1;
    for (int a=0;a<=b;a++)
    {
    orig_file>>temp;
    copy_file<<temp;
    }
    cout<<"Proses Mengkopi Telah Selesai\nDari tulis.txt ke copy.txt";
    orig_file.close();
    copy_file.close();
    return 0;
    }
~copy(){}

};

smoga membantu

by : Alfian

One Response to “copy file using c++”

  1. Mahendra Says:

    wah.. selamat atas blog barunya…

    btw aku ae gak iso nggawe c++ koyok ngono….
    hahahahahaha

Leave a Reply