I've been trying to combine two strings into a third one without modifying the original two. Heres the code I've got, but it wont compile:
char rho_dir, vel_dir;
char outputpath = "./path/to/directory/"
rho_dir = strcpy(rho_dir,strcat(strdup(outputpath),"fields_r ho"));
vel_dir = strcpy(vel_dir,strcat(strdup(outputpath),"fields_v el"));
I want to set the variables rho_dir = "./path/to/directory/fields_rho" and vel_dir = "./path/to/directory/fields_vel" without changing the string outputpath. Am I being insanely thick but I can't see an easy way to do it.