1999-05-11 13:35:55 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
1999-05-05 21:45:13 +00:00
|
|
|
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;
|
|
|
|
|
1999-05-25 18:09:09 +00:00
|
|
|
a.x = 0;
|
1999-05-05 21:45:13 +00:00
|
|
|
a.x = 1;
|
|
|
|
a.y = 2;
|
|
|
|
|
|
|
|
printf ("a.x is %d\n", a.x);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|