| | |
Running dos command through c++
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2008
Posts: 21
Reputation:
Solved Threads: 0
Hi, I am using a 16-bit compliler and i wanted to execute a dos commmand through c++ using system() command.I wrote the following code but it didn't help
I even tried wid 'system("notepad")' but even tht didn't run the command.Plz tell me if i am going wrong anywhere...
C++ Syntax (Toggle Plain Text)
#include<process.h> void main() { system("c:\\windows\\system32\\Notepad"); }
Last edited by Narue; Sep 24th, 2008 at 4:32 pm. Reason: added code tags and formatting
•
•
Join Date: Jan 2008
Posts: 3,813
Reputation:
Solved Threads: 501
•
•
•
•
Hi, I am using a 16-bit compliler and i wanted to execute a dos commmand through c++ using system() command.I wrote the following code but it didn't help
#include<process.h>
void main()
{
system("c:\\windows\\system32\\Notepad");
}
I even tried wid 'system("notepad")' but even tht didn't run the command.Plz tell me if i am going wrong anywhere...
![]() |
Similar Threads
- error when executing dos command (C++)
- HELP my PC is running realy realy slow!!!! (Viruses, Spyware and other Nasties)
- TSR program (C)
- Module not found when running in command prompt (Python)
- DOS Graphics (Game Development)
- Running a 3rd party program from Python (Python)
- Problem running DOS programs in XP (Windows NT / 2000 / XP)
- Error message when running simple Java pgm (Java)
Other Threads in the C++ Forum
- Previous Thread: calling a function inside that same function
- Next Thread: linked list and text file
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock wordfrequency wxwidgets






