Hi,
My program takes two (filename) arguments, and I want the second argument to change to filename2C.dat
[slippy@slipnslidn ~]% ./program filename1.dat filename2.dat
Thanks for your help.Code:FILE* fn, fm, fo; int main(int* argc, char** argv){ fn = fopen(argv[1], "r"); fm = fopen(argv[2], "r"); /* This doesn't work... */ fo = fopen(strcat(strstr(argv[2], "."), "C.dat", "w")); /* Do something */ /* Shut things down */ close(fn); close(fm); close(fo); }