Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
Fig01_11.cpp - Dynamically allocating an IntCell object (lame)
|
||||
|
||||
#include <iostream.h>
|
||||
#include "IntCell.h"
|
||||
|
||||
int main( )
|
||||
{
|
||||
/* 1*/ IntCell *m;
|
||||
|
||||
/* 2*/ m = new IntCell( 0 );
|
||||
/* 3*/ m->write( 5 );
|
||||
/* 4*/ cout << "Cell contents: " << m->read( ) << endl;
|
||||
|
||||
/* 5*/ delete m;
|
||||
/* 6*/ return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user