Error C2664 "STD: : string VideoCompositor: : getShowTime (STD: : string & amp; 1 cannot be the parameter, int) ": from" STD: : string "into" STD: : string & amp;"

CodePudding user response:
Means you have to build a string variable that receives the results of your getStartTime, then use this variable when parameter to call getShowTimeCodePudding user response:
On the other hand, you want to call, then in getShowTime code change over there, or not reference, or front const referenceCodePudding user response:
Method requires a string reference as a parameterString STR (videoObject getStartTime ());
GetShowTime (STR);

CodePudding user response:
Reference that is itselfIf a parameter is a reference, so that the incoming variables of itself, if the variable is a temporary variable that is to say he is the right value, and the right values cannot be changed,
With the following code
Has the following function
Void fun (int & amp; A) {
A=3;
}
Int ret () {
Return 10;
}
int b;
Fun (b);//this sentence after the execution is 3 b
If this is so call?
Fun (3);
Or
Fun (ret ());//execution after the change of is who??????