fork download
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. class Building
  5. {
  6. private: char *name, *style, *description, year, month, day;
  7. public:
  8. void message()
  9. {
  10. cout << "LET`S SEE NEW BUILDING" << endl;
  11. };
  12. void charact(char *name_building, char *style_building, char *characteristics_building, int age_date, int month_date, int day_date)
  13. {
  14. name = name_building;
  15. style = style_building;
  16. description = characteristics_building;
  17. year = age_date;
  18. month = month_date;
  19. day = day_date;
  20. };
  21. void get()
  22. {
  23. cout << "THE BUILDING NAME IS - " << name << endl;
  24. cout << "THE BUILDING STYLE IS - " << style << endl;
  25. cout << "THE BUILDING DESCRIPTION - " << description << endl;
  26. cout << "THE BUILDING AGE - " << year<<"."<<month<<"."<<day<< endl;
  27. };
  28. };
  29.  
  30. int main()
  31. {
  32. Building St_Yura_Church;
  33. St_Yura_Church.message();
  34. St_Yura_Church.charact("Yura","baroko","style", 1876, 9, 30);
  35. St_Yura_Church.get();
  36. Building Big_Ben;
  37. Big_Ben.message();
  38. Big_Ben.charact("BIG_BEN","clock","garden",1999,9,3 );
  39. Big_Ben.get();
  40.  
  41. system("pause");
  42. return 0;
  43. }
Success #stdin #stdout #stderr 0s 4512KB
stdin
Standard input is empty
stdout
LET`S SEE NEW BUILDING
THE BUILDING NAME IS - Yura
THE BUILDING STYLE IS - baroko
THE BUILDING DESCRIPTION  - style
THE BUILDING AGE - T.	.
LET`S SEE NEW BUILDING
THE BUILDING NAME IS - BIG_BEN
THE BUILDING STYLE IS - clock
THE BUILDING DESCRIPTION  - garden
THE BUILDING AGE - �.	.
stderr
sh: 1: pause: not found