Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. main
  2.  
  3. #include <iostream>
  4. #include "Tacka.h"
  5.  
  6. int main() {
  7. kolokvijum::Tacka a("A", 1, 2);
  8. a.printName();
  9. o.printName();//ne mogu pristupiti ovom objektu, kaze undefined
  10. system("pause");
  11. return 0;
  12. }
  13.  
  14.  
  15. header
  16.  
  17.  
  18. #pragma once
  19. namespace kolokvijum {
  20. class Tacka
  21. {
  22. int x, y;
  23. char T;
  24. public:
  25. Tacka(char*, int, int);
  26. Tacka(int = 0, int = 0);
  27. ~Tacka();
  28. void printName();
  29. };
  30. extern const Tacka o;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement