This is the function I am coding now-
insertobjectnames(std::string clsname, std::string objname)
Now within the above function I have to invoke another function that takes as input the same parameters as above 2, but first one as string and second one as string pointer variable
The declaration for the second function is given below-
int analyse(const std::string key, std::string * key2)
How do I use the objname parameter from the first function to invoke the second function above? The second function (within itself) extracts the value of key2 from the parameters and then uses them as per requirements.
analyseto expect a pointer forkey2. It should take a reference (or a const reference, if it's not going to modify key2). Similarly, usingconst referenceparameters instead of passing strings by value is preferable.