import source from 1.3.40
[external/swig.git] / Examples / chicken / overload / example.cxx
1 /* File : example.c */
2
3 #include "example.h"
4 #include <stdio.h>
5
6 void foo(int x) {
7   printf("x is %d\n", x);
8 }
9
10 void foo(char *x) {
11   printf("x is '%s'\n", x);
12 }
13
14 Foo::Foo () {
15   myvar = 55;
16   printf ("Foo constructor called\n");
17 }
18
19 Foo::Foo (const Foo &) {
20   myvar = 66;
21   printf ("Foo copy constructor called\n");
22 }
23
24 void Foo::bar (int x) {
25   printf ("Foo::bar(x) method ... \n");
26   printf("x is %d\n", x);
27 }
28
29 void Foo::bar (char *s, int y) {
30   printf ("Foo::bar(s,y) method ... \n");
31   printf ("s is '%s'\n", s);
32   printf ("y is %d\n", y);
33 }