--> Christopher Butler wrote to All <--
CB>class GraphicsScreen {
CB> public:
CB> GraphicsScreen();
CB> ~GraphicsScreen();
CB>int main(void)
CB>{
CB> GraphicsScreen gs; // Initalize object, and set screen
CB> delete &gs; // Back to text mode
Chris, you never delete something you didn't previously allocate with
new! This is guaranteed to cause serious problems.
Since gs will go out of scope at the end of main(), its destructor
will be called automatically. You don't have to do a thing. That's one
of the nice features of classes.
Cliff Rhodes
cliff.rhodes@juge.com
X CMPQwk 1.42 1692 X"Many men able to cheer are unable to think." - Ed Howe
--- Maximus/2 3.01
---------------
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
|