/****************************************************************************** *** FILE: no_errors_dream.cpp *** DATE: 03/17/2004 *** AUTHOR: Daniel Dementiev *** GOAL: This program illustrates how no error checking can cause a damage *** to the data. Pay attention to the method Array::Item() we do no *** checking that the value of the index argument is valid. ******************************************************************************/ #include using namespace std; class Array { private: int count; int data[10]; int size; public: Array() : count(0), size(10) {}; int Count() const { return count; }; int Size() const { return size; }; int& Item(int index) { return data[index]; } }; void main() { Array a; cout<<"count = "<