G
HI!
hab das nun mal gemacht, ein DOS-Prompt implementiert, jedoch recht einfach. Hab dazu eine ENdlosschleife verwendet, ist halt nicht besonders schön, köntne man das auch anders machen?
gruß
gemuse
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[]) {
char format[5], eingabe[80];
int i;
if(argc != 2) {
printf("Ungueltgie Parameteranzahl\n");
exit(1);
} else {
printf("ACHTUNG: ALLE DATEN AUF DEM \nFESTPLATTENLAUFWERK %s GEHEN VERLOREN!\n", argv[1]);
printf("Formatierung durchfuehren (J/N)?");
gets(format);
if(strcmp("j", format)== 0) {
for(i=0; i<=100; i++) {
printf("%i %% formatiert\r", i);
sleep(100);
}
printf("\n\nFestplatte wurde erfolgreich formatiert\n\n");
while(1) {
printf("C:\\>");
gets(eingabe);
printf("\nBefehl oder Dateiname nicht gefunden\n");
}
} else {
exit(1);
}
}
getch();
}