int main(int argc, char **argv) { if (argc < 4) { printf("USAGE: convertvec method input_path output_path\n"); printf("Method is either bin2txt or txt2bin\n"); return 0; } if(strcmp(argv[1], "bin2txt") == 0) bin2txt(argv[2], argv[3]); else if(strcmp(argv[1], "txt2bin") == 0) txt2bin(argv[2], argv[3]); else printf("Unknown method: %s\n", argv[1]); return 0; }
int main(int argc, char *argv[]) { if(argv[0][1] == 'g') txt2bin(*argv[1]); if(argv[0][1] == 'q') get_quote(*argv[1]); }