It’s not just
objects that can be passed by reference. All the other types we’ve seen
can, too. For example, to swap two integers, we could write something
like:
void Swap ( double &dX,
double &dY )
{
double
dTemp = dX;
dX = dY;
dY = dTemp;
}
We would call this
function in the usual way:
double dX = 0;
double dY = 100;
Max.SetPos ( dX, dY
);
Swap ( dX, dY );
Max.GoesTo ( dX, dY,
5 );
When people start passing things like integers by reference, they often
try
to use an expression as a reference argument. For example:
double dX = 0;
double dY = 100;
Swap ( dX, dY + 1 ); // WRONG!!
This is not legal because the expression
dY + 1
is not a variable – it does not occupy a location that the reference
can refer to. It is a little tricky to figure out exactly what kinds of
expressions can be passed by reference. For now a good rule of thumb is
that reference arguments have to be variables.
Alan Sturgess shared an excellent video he made using Tales Animator! You can still download Tales Animator here. Unfortunately it is only available for Wi
There is a prototype of simple online character designer available
HERE. It is only a prototype,
it does not contain many pieces yet but it can already generat
Web Cartoon Maker 1.5 is finally here! You can download it
HERE!
Here is what was updated in version 1.5:
Web Cartoon Maker Desktop Edition is now fully standal