Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Vektor3d
- {
- double x,y,z;
- public:
- Vektor3d (double x, double y, double z) { Vektor3d::x=x; Vektor3d::y=y; Vektor3d::z=z;};
- Vektor3d () {Vektor3d::x=0; Vektor3d::y=0; Vektor3d::z=0; };
- void Ispisi () const
- {
- std::cout<<"{"<<x<<","<<y<<","<<z<<"}";
- }
- };
- int main ()
- {
- Vektor3d v1(3,4,5),v2;
- v1.Ispisi ();
- v2.Ispisi();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement