My compiler is complaining that "Expression is not assignable" for the line of code handling the str.size function. I can't tell what I have wrong. Can someone help ? I'm passing a string into a function and trying to get the length of it.
int ValueString::value(string str)const
{
int length;
str.size() = length;
return length;
}