C++ File Delete Code - Dosya Nasıl Silinir C++

1

1Enjoy

Forward
Owner
Joined
Jul 29, 2019
Messages
1,023
Reaction score
5,449
C++ da dosya silmek için remove fonksiyonu kullanılır
Aşağıda örnek olarak verdim değişkene tanımlanmış bir şekilde. İyi kodlamalar rc ailesi

C++:
#include <iostream>

using namespace std;

int main(){

  int sonuc = remove("dosya.txt");

  if(sonuc == 0){
    cout << "Dosya silindi";
  } else {
    cerr << "Dosya silinemedi";
    return -1;
  }

  return 0;
}
 
SPAM IS FORBIDDEN!
  • SPAMMERS ARE BANNED FROM THE FORUM AND CANNOT USE ANY OF THE CHEATS
  • For example: thanks, thx, very good, asdqwe, working, ty and so on!
  • For example: Writing the same message over and over. thanks, thx and so on!
  • Copying and copying someone else's message is prohibited.
  • It is forbidden to send messages to increase the number of comments on threads that you have no knowledge of.
  • Write your own opinion when commenting!
  • If you see spam message, please let us know with the REPORT button!

Tema düzenleyici

Top Bottom