int result;
char old[]="/home/aakash/Downloads/10_Test_Iterations/10 Test Iterations/test";
char oldname[] ="/home/aakash/memphys/memphys-main/examples/navier_stokes_2D/test"+((char)n)+"_polydeg_3_fields_gmsh.csv";
char newname[] =old+((char)n)+"/_polydeg_3_fields_gmsh.csv";
result= rename( oldname , newname );
This is my code, I'm basically trying to move files around directories in c++. But whenever I run my code it throws this error:
error: invalid operands of types ‘char*’ and ‘const char [5]’ to binary ‘operator+’
Does anyone know how to fix this?