File: a_livepatch1.cpp

package info (click to toggle)
libpulp 0.3.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,976 kB
  • sloc: ansic: 11,792; python: 1,216; sh: 881; makefile: 871; cpp: 582; asm: 387
file content (38 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>

class Point
{
  protected:
  int x, y;

  public:
  Point(int x, int y);

  int Get_X(void) const;
  int Get_Y(void) const;

  void Print_LP(void);
};

class Point3D : public Point
{
  protected:
  int z;

  public:
  Point3D(int x, int y, int z);

  int Get_Z(void) const;

  void Print_LP(void);
};

void Point::Print_LP(void)
{
  std::cout << x + 1 << ' ' << y + 1 << '\n';
}

void Point3D::Print_LP(void)
{
  std::cout << x + 1 << ' ' << y + 1 << ' ' << z << '\n';
}