Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <cstdio>
  2. #include <string>
  3. #include <iostream>
  4. using namespace std;
  5. class Graph
  6. {
  7. private:
  8. string identifier;
  9. string zone;
  10. public:
  11. int path = 0;
  12. Graph();
  13. ~Graph();
  14. };
  15. Graph::Graph()
  16. {
  17. cout<<"Konstruktor - przypisuje wartosc"<<endl;
  18. int graf = {};
  19. cin>>graf;
  20. cout<<graf;
  21. }
  22. Graph::~Graph()
  23. {
  24. cout<<"Obiekt usuwany z pamieci"<<endl;
  25. }
  26. int main()
  27. {
  28. char graf[20];
  29. for (int i=0; i<10; i++)
  30. {
  31. cin>>graf[i];
  32. }
  33. cout<<graf<<endl;
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement