i m new at c++ programming. i have a problem about system() using.
you know system( ) function lets us to use dos commands.
and i have to use it like
my problem starts here. i want to use commands with variable.
for ex :
i can not use system function with variable. i want to use that function to effect the folder i choose. but system function does what is written between quotation marks. So it's looking for the folder named "folder" . i want it to effect the photos folder.Code:char folder ; . cout<<"which folder"<<endl; // for ex i typed " photos " ; cin>>folder; . system("dir folder") // here is my problem.
so here are my questions ;
how can i use system function with variable ?
or is there anyway to use dos commands for the variables (folders) i choose ?
or is there any other way to do this ?
i m newbie.. i will be glad if someone can help, any help would be appreciated.
Thanx in advance.