Originally Posted by
cnfwriter
After a quick test, it looks like the cmd shell in Windoze does not expand wildcards for you. What the program gets is exactly what you type in.
Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char* argv[]) {
printf("Argc is: %d\n", argc);
printf("Argv are: ");
for (int i = 0; i < argc; i++) {
printf("%s ", argv[i]);
if (!((i+1)%5)) {
printf("\n");
}
}
return 0;
}
Code:
C:\DOCUME~1\Andrew\Desktop>temp c*
Argc is: 8
Argv are: temp casting Chapter04_Code Chapter09_Code check1.txt
check2.txt CIS460_Syllabus[1].doc crayon
You do have to (gasp!) type the command yourself, though.