All pastes #916671 Raw Edit

Something

public text v1 · immutable
#916671 ·published 2008-02-24 21:08 UTC
rendered paste body
int leggi_array( int *p, int dim, int letti=0)
{
 try
 {
  if(!IN) throw(1);

  if( letti==dim) return 0;

  int x;
  IN >> x;

  if( x==-1 &&  *(p+letti-1)==-1 ) return -1;

   *( p+letti)=x;
   return 1+leggi_array( p, dim, letti+1);
 }
 catch(int error) { cout << "problemi con il file di input" << endl; }
}