summaryrefslogtreecommitdiff
path: root/tests/exec/constructor1.cpp
blob: b5ed3e7881f69163d201a1a9300e43a8196a2eaf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>

class A {
public:
  int x;
  int y;
  A (int x, int y);
};

A::A(int x, int y) { this->x = x; this->y =y; }

int main() {
  A a = A(17, 42);
  std::cout << a.x << "\n";
  std::cout << a.y << "\n";
}