hallo,
I have a function that takes this as argument:
char *filename
It is a pointer to char array, I guess. I can use this function by specifying directly the filename argument. Something like this:
myFunction("filname.txt");
But I cannot do that because the filename is loaded by the application and I store it in a string inside a vector. So when I would like to use I should do it like this:
myFunction(myVector[0]);
but this will give a me a compilation error saying that myFunction doesn't have overloaded method for this argument.
Now: myVector[0] is a string, exactly like "filename.txt". So why it doesn't work? Does someone can enlight?
thanks
I have a function that takes this as argument:
char *filename
It is a pointer to char array, I guess. I can use this function by specifying directly the filename argument. Something like this:
myFunction("filname.txt");
But I cannot do that because the filename is loaded by the application and I store it in a string inside a vector. So when I would like to use I should do it like this:
myFunction(myVector[0]);
but this will give a me a compilation error saying that myFunction doesn't have overloaded method for this argument.
Now: myVector[0] is a string, exactly like "filename.txt". So why it doesn't work? Does someone can enlight?
thanks