I want to make a C program which will be called with some parameters; Each parameter will represent a filename and I want to write some stuffs in each of them.
FILE * h0;
h0 = fopen(argv[0],"w");
char buffer[100] = "something here\n";
fprintf(h0,buffer);
fclose(h0);
For C++ there is something called c_str() but I didn't manage to use it here. Any tips how to handle it?