Hello everyone:
I have a function that I can't change. A special container must be passed to the function as an argument. For example:
ReadFile( containerToUse );
Here is the problem:
I have TWO containers called containerToUseOne and containerToUseTwo. Before calling the function, I run an if/else statement to decide which container to use. For example, in the if, I do:
containerToUse = "containerToUseOne";
But when I call the function with:
ReadFile( containerToUse.data() );
I get
error: no matching function for call to ReadFile.
Can anyone see what I'm doing wrong? Sorry, this is probably a silly question! Thanks for any advice.
I have a function that I can't change. A special container must be passed to the function as an argument. For example:
ReadFile( containerToUse );
Here is the problem:
I have TWO containers called containerToUseOne and containerToUseTwo. Before calling the function, I run an if/else statement to decide which container to use. For example, in the if, I do:
containerToUse = "containerToUseOne";
But when I call the function with:
ReadFile( containerToUse.data() );
I get
error: no matching function for call to ReadFile.
Can anyone see what I'm doing wrong? Sorry, this is probably a silly question! Thanks for any advice.