Hello all:
I would appreciate help with what is probably a silly question:
I have this function:
long int getName (const char *Name);
I have written code that gets data from a file and puts the data into this vector:
vector<string> nameVector
What I would like to do is set up a loop that takes each element from nameVector and uses it as the argument in the function getName.
I have not dealt with strings and char much and I'm having some trouble formulating this... I'm sheepishly asking this question because I suspect there's something simple I'm not getting. Is the string vector incompatible with the function requirement for char? If so, how can I set up the vector so that this is not a problem?
I would really appreciate any advice!
I would appreciate help with what is probably a silly question:
I have this function:
long int getName (const char *Name);
I have written code that gets data from a file and puts the data into this vector:
vector<string> nameVector
What I would like to do is set up a loop that takes each element from nameVector and uses it as the argument in the function getName.
I have not dealt with strings and char much and I'm having some trouble formulating this... I'm sheepishly asking this question because I suspect there's something simple I'm not getting. Is the string vector incompatible with the function requirement for char? If so, how can I set up the vector so that this is not a problem?
I would really appreciate any advice!