+ 1
How can I delete folder or rename it?
4 Respuestas
+ 8
Miroslav Vyšný
#include <iostream>
#include <direct.h>
using namespace std;
int main(int argc, char** argv) {
if (argc < 2) {
cerr << "Usage: " << argv[0] << " [dir name]" << endl;
return(EXIT_FAILURE);
}
if (rmdir(argv[1]) == -1) {
// Remove the directory
cerr << "Error: " << strerror(errno) << endl;; return(EXIT_FAILURE);
}
}
source:
https://www.oreilly.com/library/view/c-cookbook/0596007612/ch10s12.html
I hope I was helpful
+ 1
right click and press rename file
0
slick He meant how to do it within a C++ program xD
0
Thank you I will try it