aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/annota2.cc
blob: 234752e49af20230f41aee10ab4a37bf03e78cde (plain)
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
#include <stdio.h>

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


int A::foo (int arg)
{
  x += arg;
  return arg *2;
}

int main()
{
  A a;

  a.x = 0;
  a.x = 1;
  a.y = 2;

  printf ("a.x is %d\n", a.x);
  return 0;
}