Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. struct s_date {
  7. int day, month, year;
  8. };
  9.  
  10. struct s_size {
  11. int length, width, height;
  12. };
  13.  
  14. struct obj {
  15. int num;
  16. string tipe;
  17. string model;
  18. string manufacturer; //производитель
  19. int guarantee;
  20. s_date date;
  21. s_size size;
  22. int weight;
  23. int power; //потребляемая мощность
  24. int kol; //количество
  25. int max_life;
  26. int cost;
  27. bool active;
  28. };
  29.  
  30. struct stock {
  31. int n;
  32. obj *M;
  33. stock(int); //конструктор по целому типу
  34. ~stock(); //деструктор
  35.  
  36. };
  37.  
  38. stock::stock(int k) { //конструктор по целому типу
  39. obj *M = new obj;
  40. for (int i = 0; i < k; ++i) {
  41. M[i].active = false;
  42. }
  43. }
  44.  
  45. stock::~stock() { //деструктор
  46. delete[]M;
  47. }
  48.  
  49. int main() {
  50.  
  51.  
  52.  
  53. return 0;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement