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
IntCell.cpp - IntCell class implementation (Fig 1.8)
IntCell.cpp - IntCell class implementation (Fig 1.8) #include "IntCell.h" /** * Construct the IntCell with initialValue */ IntCell::IntCell( int initialValue ) : storedValue( initialValue ) { } /** * Return the stored value. */ int IntCell::read( ) const { return storedValue; } /** * Store x. */ void IntCell::write( int x ) { storedValue = x; }
Privacy Policy
|
Link to Us
|
Links