passing 'const char *' to parameter of type 'char *' discards qualifiers

C
  char* write_filename;

              fopen((char*)write_filename,"wb");
                 makedir(write_filename);
Source

Also in C: