C++ Codes
Algorithms
Algorithm Analysis in C++
Beginners
Code Snippets
Graphics
Data Structures
File Manipulation
Games
Mathematics
Miscellaneous
Visual C++ Library
C++ > Data Structures and Algorithm Analysis in C++ sample source codes
Fig01_11.cpp - Dynamically allocating an IntCell object (lame)
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; }
Privacy Policy
|
Link to Us
|
Links