- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <iostream.h>
-
- using namespace std;
-
- int main(int argc, char *argv[])
- {
- FILE *fic;
- char vers_fic[] = " > fic" ,car,command[50];
- printf("Command MS-DOS a executer ?\n");
-
- while (1)
- {
- cin.getline(command,50);
- strcat(command,vers_fic);
- system(command);
- fic = fopen("fic","rb");
- car = fgetc(fic);
- while(!feof(fic))
- {
- printf("%c",car);
- car = fgetc(fic);
- }
- fclose(fic);
- }
-
- system("del fic");
- return 0;
- }
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream.h>
using namespace std;
int main(int argc, char *argv[])
{
FILE *fic;
char vers_fic[] = " > fic" ,car,command[50];
printf("Command MS-DOS a executer ?\n");
while (1)
{
cin.getline(command,50);
strcat(command,vers_fic);
system(command);
fic = fopen("fic","rb");
car = fgetc(fic);
while(!feof(fic))
{
printf("%c",car);
car = fgetc(fic);
}
fclose(fic);
}
system("del fic");
return 0;
}