All pastes #916758 Raw Edit

Stuff

public text v1 · immutable
#916758 ·published 2008-02-24 22:11 UTC
rendered paste body
void leggi_array( int *p, int dim, int &letti)
{
 try
 {
  if(!IN) throw(1);

  if( letti==dim-1) return;

  int x;
  IN >> x;

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

  letti++;
  leggi_array( p, dim, letti);

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