Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 23rd, 2012  |  syntax: None  |  size: 0.41 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. void Integer::NaN(string s)
  2. {
  3.    if(s == NULL)
  4.    {
  5.       if(!isdigit)
  6.       {
  7.          this->nan = true;
  8.          return;
  9.       }
  10.       this->nan = false;
  11.    }
  12.  
  13. }
  14.  
  15. }
  16.  
  17.  
  18. void Integer::NaN(string s)
  19. {
  20.    string::iterator p;
  21.    for(p = s.begin(); p < s.end(); p++)
  22.    {
  23.       if(!isdigit(*p))
  24.       {
  25.          this->nan = true;
  26.          return;
  27.       }
  28.    }
  29.    this->nan = false;
  30. }
  31.  
  32. }