I have done a search in google and been told this is impossible as I can only get a static char *
from a string, so I am looking for an alternative.
Here is the situation:
I have a .txt file that contains a list of other .txt files and some numbers, this is done so the program can be added to without recompilation. I use an ifstream
to read the filenames into a string.
The function that they are required for is expecting a char *
not a string
and apparently this conversion is impossible.
I have access to this function but it calls another function with the char *
so I think im stuck using a char *
.
Does anyone know of a work around or another way of doing this?