Guest User

Untitled

a guest
Oct 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. #include <string.h>
  4. #include <fstream>
  5.  
  6. #include <sstream>
  7. using namespace std;
  8.  
  9.  
  10. class Raport
  11. {
  12.  
  13. private:
  14. int j, i, p;
  15. int ListRaport, ListNamber, ListColumns;
  16. string line, token;
  17. string*** DataReport;
  18. public:
  19. Raport();
  20.  
  21. void print1() {
  22.  
  23. for (int i = 0; i<ListRaport; i++)
  24. for (int j = 0; j<ListNamber; j++)
  25. for (int k = 0; k<5; k++)
  26. cout << DataReport[i][j][k] << " ";
  27. }
  28. ~Raport();
  29. };
  30.  
  31. Raport::Raport()
  32. {
  33.  
  34. int ListRaport = 3;
  35. ListNamber = 3;
  36. ListColumns = 5;
  37.  
  38. //данные из рапорта
  39. string*** DataReport = new string**[ListRaport];
  40.  
  41. for (int i = 0; i < ListRaport; i++)
  42. {
  43.  
  44. DataReport[i] = new string*[ListNamber];
  45. for (int j = 0; j < ListNamber; j++) {
  46. DataReport[i][j] = new string[5];
  47. }
  48.  
  49. }
  50. for (int i = 0; i<ListRaport; i++)
  51. for (int j = 0; j<ListNamber; j++)
  52. for (int k = 0; k<5; k++)
  53. DataReport[i][j][k] =k;
  54.  
  55.  
  56.  
  57. }
  58.  
  59. Raport::~Raport()
  60. {
  61. }
  62.  
  63.  
  64.  
  65.  
  66. int main()
  67. {
  68.  
  69. Raport Raport1();
  70. Raport1.print1();
  71.  
  72. system("pause");
  73. return 0;
  74. }
Add Comment
Please, Sign In to add comment