title: array class nodes not work
body: <p>i have following  code,which does not show me anything</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  class Array{
  
  private :
       long *a;
  public:
         Array(int size){
          a=new  long[size];
  
  
         }
         void set(int index,long  value){
          a[index]=value;
  
         }
         long get(int index){
          if (index&lt;0 || index&gt;(sizeof(a)/sizeof(long)))    {
  
           exit(1);
          }
           return a[index];
         }
  
  
  
  
  
  
  
  } ;
  int main(){
  
        Array* arr=new Array(100);
               int number=0;
               int j=0;
               arr-&gt;set(0,11);
               arr-&gt;set(1,12);
               arr-&gt;set(2,14);
               arr-&gt;set(3,15);
               arr-&gt;set(4,20);
               arr-&gt;set(5,34);
               arr-&gt;set(6,50);
               arr-&gt;set(7,10);
               arr-&gt;set(8,80);
               arr-&gt;set(9,100);
               number=10;
               int search=80;
                for (int i=0;i&lt;number;i++){
                    if (arr-&gt;get(i)==search){
                     cout&lt;&lt;"search found "&lt;&lt;endl;
                     break;
                    }
  
  
  
                    }
  
  
                      //cout&lt;&lt;arr-&gt;get(8)&lt;&lt;endl;  
  
   return 0;
  }
  </code></pre>
  
  <p>there is not any error  or  bugs,just no output,what is wrong?please help me
  UPDATED:
  why following code</p>
  
  <pre><code>int k=10;//delete it;
                       for (int j=0;j&lt;number;j++)
                           if (arr-&gt;get(j)==k)
                                break;
                            for (k=j;k&lt;number-1;k++)
                                arr-&gt;set(k,arr-&gt;get(k+1));
                      number--;
  
                       for (int j=0;j&lt;number;j++)
                           cout&lt;&lt;arr-&gt;get(j)&lt;&lt;"  ";
  </code></pre>
  
  <p>deletes 11 and not 10?old problem is fixed introduce new variable for counting size of array,but this problem i have now</p>