Revision 1546 trunk/src/tools99/string4.cpp

string4.cpp (revision 1546)
20 20
  }
21 21
  t=tmp;
22 22
  delete [] tmp;
23
  tmp = 0;
24

  
23 25
  return (c);
24 26
}
25 27

  
26 28
istream & operator >> (istream & c, line_adstring & t)
27 29
{
28 30
  const unsigned int max_length=1025;
29
  char * tmp= new char[max_length+1];
30
  int ch;
31
  ch=c.get();
31
  char* tmp = new char[max_length+1];
32
  int ch = c.get();
32 33
  // throw away the newline at the end of the last line if necessary
33 34
  if (ch == '\n') ch=c.get();
34 35
  unsigned int ii=0;
......
46 47
  tmp[ii]='\0';
47 48
  t=tmp;
48 49
  delete tmp;
50
  tmp = 0;
51

  
49 52
  return (c);
50 53
}

Also available in: Unified diff