Advertisement
tattersail

Roman_int.h

Apr 12th, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. #ifndef ROMAN_INT_H_INCLUDED
  2. #define ROMAN_INT_H_INCLUDED
  3. //------------------------------------------------------------------------------
  4. #include <iostream>
  5. #include <string>
  6. #include <vector>
  7. #include <fstream>
  8. #include <sstream>
  9. #include <cstdlib>
  10. #include <exception>
  11. //------------------------------------------------------------------------------
  12. using namespace std;
  13. //------------------------------------------------------------------------------
  14. void error_throw(string s1, string s2, double d);
  15. //------------------------------------------------------------------------------
  16. int input_stop(istream& is);
  17. //------------------------------------------------------------------------------
  18. const int no_int = -123456789123456789123456789;
  19. const string no_string = "error_string_key_word";
  20. const int not_a_number = -77777;
  21. const string not_a_roman = "1337";
  22. const int roman_max = 3999;
  23. const int roman_min = 1;
  24. //------------------------------------------------------------------------------
  25. struct Roman_int {
  26. Roman_int(string r, int arabic);
  27. Roman_int();
  28. int as_int() const { return arabic; }
  29. string roman;
  30. int arabic;
  31. };
  32. //------------------------------------------------------------------------------
  33. void init_vectors();
  34. //------------------------------------------------------------------------------
  35. int get_1s(istream& is);
  36. //------------------------------------------------------------------------------
  37. int get_10s(istream& is);
  38. //------------------------------------------------------------------------------
  39. int get_100s(istream& is);
  40. //------------------------------------------------------------------------------
  41. int get_1000s(istream& is);
  42. //------------------------------------------------------------------------------
  43. istream& operator>>(istream& is, Roman_int& rm);
  44. //------------------------------------------------------------------------------
  45. ostream& operator<<(ostream& is, Roman_int& rm);
  46. //------------------------------------------------------------------------------
  47. #endif // ROMAN_INT_H_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement