Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Dos command run through menu
Index -> Programming, C++ -> C++ Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rickdragon




PostPosted: Tue Jan 20, 2004 6:59 am   Post subject: Dos command run through menu

/*
Laughing Laughing
My All Program working in Turbo C++ Program
Laughing Laughing
*/
---------

#include<stdio.h>
#include<stdlib.h>
#include<graphics.h>
#include<conio.h>
void main()
{
char *command[]={
"DIR",
"CHKDSK",
"TIME",
"DATE",
"LABEL"
};
char ch;
for( ; Wink
{
do
{
int i;
char far *vidmem = 0xB8000000;
getch();
clrscr();
for(i=1;i<=3999;i=i+2)
*(vidmem +i) =110;
printf("Prg. To Run DOS Commands\n");
printf("1.DIR\n");
printf("2.CHKDSK\n");
printf("3.TIME\n");
printf("4.DATE\n");
printf("5.LABEL\n");
printf("6.EXIT\n");
printf("\nchoice : ");
ch=getche();
printf("\n");
}
while((ch>'1') || (ch<'6'));
if(ch=='6')
break;
system(command[ch - '1']);
}
}
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, C++ -> C++ Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: