Finally, I did it. It will be writer.write_off(mesh, output_file_name.c_str()); instead of argv[3]= output_file_name.c_str();