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 29 30 31 32 33 34 35 36 37 38 39
|
#include <stdio.h>
class A {
public:
int a(int i, float b) {
printf("inside A::a(%d, %f)\n", i, b);
return i;
}
int c(int p, int q);
};
int A::c(int p, int q){
printf("A::c(%d, %d)\n",p,q);
return p;
}
void b(char c, char *str);
void b(char c, char *str) {
printf("b(%c, %s)\n", c, str);
}
void d(char c, char *str) {
printf("d(%c, %s)\n", c, str);
}
int main() {
A a;
printf ("Advice: each function must be wrapped by call and exec advice\n");
printf ("=============================================================\n");
a.a(4711, 3.14f);
printf ("-------------------------------------------------------------\n");
b('H', "ello World");
printf ("-------------------------------------------------------------\n");
a.c(4,5);
printf ("-------------------------------------------------------------\n");
d('H', "ello World");
printf ("=============================================================\n");
}
|