#include<iostream>
using namespace std ;
const LIMIT = 10 ;

class cSafeArray
{
private:
	int Array[LIMIT] ;
	void Initialize() ;
public:
	cSafeArray() ;
	~cSafeArray() ;
	void SetEl(int Index,int Value) ;
	int GetEl(int Index) ;
} ;

cSafeArray::cSafeArray()
{
	Initialize() ;
}
cSafeArray::~cSafeArray()
{
	//I think there is no need to a destructor in this
	//exampel .
}
void cSafeArray::Initialize()
{
	int i ;
	for (i=0 ;i<=LIMIT-1 ;i++)
	{
		SetEl(i,0) ;
	}
}
void cSafeArray::SetEl(int Index,int Value)
{
	if(Index >= 0 && Index <= (LIMIT-1))
	{
		Array[Index] = Value ;
	}
	else
		cout<<"Error ! Check the Index value !\n" ;
}
int cSafeArray::GetEl(int Index)
{
	return(Array[Index]) ;
}

void main()
{
	cSafeArray sa1;
	int temp=12345;
	sa1.SetEl(7,temp);
	cout<<sa1.GetEl(7)<<"\n" ;
	cout<<sa1.GetEl(5)<<"\n" ;
	cin.get() ;
}



