+ 1
How to open a document in my desktop using c++ codings ?
i want to open a file using c++ . i have heard that it can be done by using system () start or system () explorer. plz help ASAP
2 Réponses
+ 3
The code for this will depend on the interpretation of 'open'.
0) open = run a file in the default program.
Command :
string pf; getline(cin,pf);
system("\""+pf+"\""); // Enter the complete path + file name + extension, in pf.
1) open = open folder having the file.
Command :
string pf; getline(cin,pf);
system("explorer \""+pf+"\""); // Enter the complete path + file name + extension, in pf.
0
thnx for your help