Hi there everybody.
I'd like to be able to supply my program with a drive letter, and have the program use the system() function on this target drive (like a batch file). The below is an example of what I've tried, but the system() line errors.
Sorry for the stupid question!Code:char drive[1];
printf("Target drive is: ");
scanf("%s", drive);
printf("\nOkay, using %s: as target drive...\n", drive);
system("dir %s:", drive);
system("PAUSE");