I'm trying to make a program that outputs a set string, and a variable into system(). However, I can't make system() accept it.
Note that mkdir is just an example. I've already been advised to type 5 more letters.Code:#include <iostream> #include <stdlib.h> //For system() using namespace std ; int main() { string name ; string newstring ; cout << "Enter a string:" ; cin >> name ; newstring = "mkdir "+name; //Adds mkdir and your input. system(newstring); //Is the problem. //cout << newstring <<endl; /*For testing*/ }



LinkBack URL
About LinkBacks


