Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <cstdlib>
  4. using namespace std;
  5.  
  6. class VectorDouble
  7. {
  8. friend ostream &operator << (ostream &outs, const VectorDouble &p);
  9. public:
  10. int getTala();
  11. void setTala(int Gauatala);
  12. private:
  13. int tala;
  14. };
  15.  
  16. int main ()
  17. {
  18. VectorDouble gaui;
  19. gaui.setTala(5);
  20. int tala = gaui.getTala();
  21. cout << "eg get THETTA ALVEG";
  22. int temp = gaui.getTala();
  23. cout << endl << "Gaui, sko, sjadu, verkefni " << temp << " er easy";
  24. cout << endl;
  25. cout << gaui;
  26. cout << "er jafn ";
  27. cout << endl;
  28. system( "PAUSE" );
  29. return 0;
  30. }
  31.  
  32. ostream& operator << (ostream& output, const VectorDouble& p)
  33. {
  34. output << " GAUI CHECK IT, AWEOMSE";
  35. return output;
  36. }
  37.  
  38. int VectorDouble :: getTala()
  39. {
  40. return tala;
  41. }
  42.  
  43. void VectorDouble :: setTala( int gauaTala )
  44. {
  45. tala = gauaTala;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement