0

Ok how would I make a program take one file (thats not a text file) and save with a different name like there is a file with asdf.7z and I want the program to save a copy of it as qwer.7z how?
And is there any way to do something like this:

cin>>imput;
system(""<<imput);

Thats the best I can make an example so those are me questions.

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by raptr_dflo
0

Not sure what your trying to accomplish in your code but you could investigate the rename function that resides in cstdio or stdio.h.

int rename(const char *oldpath, const char *newpath);

Edited by gerard4143: n/a

0

and for your system()-call example, try something like this:

string cmd;
cout << "What command would you like to run?" << endl;
cin >> cmd;

cout << "Trying to run: system(\"" << cmd << "\")" << endl;
system(cmd.c_str());
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.