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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.c++/] [annota2.cc] - Diff between revs 107 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 107 Rev 1765
#include <stdio.h>
#include <stdio.h>
 
 
class A {
class A {
public:
public:
  int x;
  int x;
  int y;
  int y;
  int foo (int arg);
  int foo (int arg);
};
};
 
 
 
 
int A::foo (int arg)
int A::foo (int arg)
{
{
  x += arg;
  x += arg;
  return arg *2;
  return arg *2;
}
}
 
 
int main()
int main()
{
{
  A a;
  A a;
 
 
  a.x = 0;
  a.x = 0;
  a.x = 1;
  a.x = 1;
  a.y = 2;
  a.y = 2;
 
 
  printf ("a.x is %d\n", a.x);
  printf ("a.x is %d\n", a.x);
  return 0;
  return 0;
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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