|
|
|
|
ce n'est pas compliqé. Il te faut juste connaitre l'api qui manipule le systéme de fichiers. Voici un exemple en C++ avec .Net (piqué sur le msdn):
#using <mscorlib.dll>
using namespace System;
using namespace System::IO;
int main() {
String* path = S"c:\\temp\\MyTest.txt";
try {
StreamWriter* sw = File::CreateText(path);
if (sw) __try_cast<IDisposable*>(sw)->Dispose();
String* path2 = String::Concat(path, S"temp");
// Ensure that the target does not exist.
File::Delete(path2);
// Copy the file.
File::Copy(path, path2);
Console::WriteLine(S"{0} was copied to {1}.", path, path2);
// Delete the newly created file.
File::Delete(path2);
Console::WriteLine(S"{0} was successfully deleted.", path2);
} catch (Exception* e) {
Console::WriteLine(S"The process failed: {0}", e);
}
}
tafiscobar "lou waye def bopame"
la nullite n'existe pas, l'ignorance oui, ah je suppose!!! |
Résultats pour supprimer un fichier en C++
Résultats pour supprimer un fichier en C++
Résultats pour supprimer un fichier en C++
Résultats pour supprimer un fichier en C++