Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Coord.cpp : main project file.
- #include "stdafx.h"
- #include <iostream>
- #include <iomanip>
- using namespace std;
- class Punt {
- private:
- double x;
- double y;
- public:
- Punt(double xcoord = 0, double ycoord = 0);
- void print() const;
- };
- Punt::Punt(double xcoord, double ycoord) {
- x = xcoord;
- y = ycoord;
- }
- void Punt::print() const {
- cout << "(" << x << "," << y << ")" << endl;
- }
- int main(array<System::String ^> ^args)
- {
- Punt punt(5, 5);
- punt.print();
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement