Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main(){
- string str;
- getline(cin,str);
- for(int i=0;i<(int)str.length();i++){
- if(str[i]==' ')
- str[i]='-';
- }
- //cout << str ;
- string input = " mkdir " + str;
- /*
- The basic_string::c_str() is a builtin function in C++ which
- returns a pointer to an array that contains a null-terminated sequence of characters representing the current value of thestring.
- */
- //cout << input.c_str();
- system(input.c_str());
- input = "cd /D "+str +" && start cmd";
- system(input.c_str());
- //input = "cd /D "+str+" && type nul > sol.cpp && type nul > in && type nul > out && copy D:\\CodeForces\\Vacation\\template.cpp sol.cpp && sol.cpp";
- //cout << input ;
- input = "cd /D "+str+" && type nul > sol.cpp && type nul > in.txt && type nul > out.txt";
- system(input.c_str());
- input = "cd /D "+str+" && copy D:\\CodeForces\\Vacation\\template.cpp sol.cpp && sol.cpp";
- ///input = "cd /D "+str+" && copy D:\\CodeForces\\Vacation\\template.cpp sol.cpp ";
- system(input.c_str());
- system("exit");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement