Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

default parameter c++ a field

// You have to use an overloaded method
void Object::MoveTo(double speed)
{
    MoveTo(speed, initPos);
}

void Object::MoveTo(double speed, Point position)
{
    // Everything is done here.
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #default #parameter #field
ADD COMMENT
Topic
Name
7+5 =