brsjak

stip-2

Aug 29th, 2016
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. using namespace std;
  5. class Koordinati{
  6. private:
  7.     int x;
  8.     int y;
  9.     int z;
  10. public:
  11.     Koordinati(int x, int y, int z){
  12.         x=0;
  13.         y=0;
  14.         z=0;
  15.     }
  16.     Koordinati(int x, int y, int z){
  17.         this->x=x;
  18.         this->y=y;
  19.         this->z=z;
  20.     }
  21.     //copy constructor
  22.     Koordinati(Koordinati &k){
  23.         x=k.x;
  24.         y=k.y;
  25.         z=k.z;
  26.     }
  27.     friend ostream &operator<<(ostream &out, Koordinati &ko){
  28.         out<<"("<<ko.x<<", "<<ko.y<<", "<<ko.z<<")"<<endl;
  29.         return out;
  30.     }
  31.     Koordinati& operator+=(Koordinati &novi){
  32.         //ne razbiram pod-fiksna forma :) s
  33.     }
  34.     ~Koordinati(){}
  35.  
  36. }
  37. int main(){
  38.  
  39.     return 0;
  40. }
Add Comment
Please, Sign In to add comment