UpPreviousNext







Date: 1997-04-03
From: Paul
Subject: Alexander "Progress"

I wanted to do some Alexander coding this evening but I wasn't feeling particularly clever, so I implemented a couple of PONARVian functions: a copy constructor and an assignment operator for worlds. The assignment operator is pretty easy to explain. If you already have a nice world, the assignment operator lets you make a copy of it using the equal sign:

   CWorld worldNice, worldCopy;
   worldNice.generate();     //We really like this world.
   worldCopy = worldNice;    //Now we have a copy of worldNice.
The copy constructor is similar, but even less useful:

   CWorld worldNice;
   worldNice.generate();
   CWorld worldCopy( worldNice );  //Creation and copy happen
                                     in one step.
How, you ask, will we use these? I doubt we ever will.

Paul

UpPreviousNext