URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 106 |
Rev 107 |
#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;
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.