ScreenEntityAnimation::ScreenEntityAnimation(string Input):FileLocation(Input)
{
// yadda yadda
}
Constructor question...
In a constructor can I assign a standard string object like this?
Or do I need to copy it explicity?
Thanks in advance.
Mark Coleman
Sure you can, it will use the copy constructor of the string instead of using the default constructor + assignment operator.
You can always do that if there is a constructor for the object matching what you put. You can even put a parent class's constructor there with arguments.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement