Guest User

Untitled

a guest
Apr 23rd, 2012
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment