not open and modify............I want the C++ program run the file in his own window and leave it do it's operations alone.
How to run a file using a C++ program ?
import an MS-DOS command in your C++ program.. include first stdlib.h... Then use system() function... For example, you want to run a calculator... Simply do this..
system("calc");
or notepad...
system("notepad");
or run another c++ program in the same window which is also located in the same directory as your c++ program running...
system("mycppprogram.exe");
Simple huh?? (^^,)
http://ronaldborla.blogsome.com/
Reply:You can't "run" a file, you can only run a program and not all files are programs. If you want a program to run another program, use fork. If you want a program to "run" a file that's not executable code, it can't be done.
Reply:If you want to run the program through c++ console window you have to prss ctrl+f9 or go to the
run tab%26gt;run
(This will work after a successful compilation)
or if you hav run the same program previously....
you will find a .exe file of the same program name in that directory where you have saved the program,then
just run the file by double clicking on it......
Reply:I think you're asking how to run a command line interface program in a console window on it's own. Try right-clicking the program, mousing to Open With, and selecting your terminal application (Terminal.app on OS X or MS DOS on windows).
violet
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment