Advertisement
fuadnafiz98

Untitled

Mar 10th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.17 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4.     string str;
  5.     getline(cin,str);
  6.     for(int i=0;i<(int)str.length();i++){
  7.         if(str[i]==' ')
  8.             str[i]='-';
  9.     }
  10.     //cout << str ;
  11.     string input = " mkdir " + str;
  12.     /*
  13.     The basic_string::c_str() is a builtin function in C++ which
  14.     returns a pointer to an array that contains a null-terminated sequence of characters representing the current value of thestring.
  15.     */
  16.     //cout << input.c_str();
  17.    
  18.     system(input.c_str());
  19.     input = "cd /D "+str +" && start cmd";
  20.     system(input.c_str());
  21.    
  22.     //input = "cd /D "+str+" && type nul > sol.cpp && type nul > in && type nul > out && copy D:\\CodeForces\\Vacation\\template.cpp sol.cpp && sol.cpp";
  23.     //cout << input ;
  24.    
  25.     input = "cd /D "+str+" && type nul > sol.cpp && type nul > in.txt && type nul > out.txt";
  26.    
  27.     system(input.c_str());
  28.    
  29.    
  30.  
  31.     input = "cd /D "+str+" && copy D:\\CodeForces\\Vacation\\template.cpp sol.cpp && sol.cpp";
  32.     ///input = "cd /D "+str+" && copy D:\\CodeForces\\Vacation\\template.cpp sol.cpp ";
  33.     system(input.c_str());
  34.    
  35.     system("exit");
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement