OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.c++/] [annota2.cc] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
#include <stdio.h>
2
 
3
class A {
4
public:
5
  int x;
6
  int y;
7
  int foo (int arg);
8
};
9
 
10
 
11
int A::foo (int arg)
12
{
13
  x += arg;
14
  return arg *2;
15
}
16
 
17
int main()
18
{
19
  A a;
20
 
21
  a.x = 0;
22
  a.x = 1;
23
  a.y = 2;
24
 
25
  printf ("a.x is %d\n", a.x);
26
  return 0;
27
}
28
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.