PageRenderTime 27ms CodeModel.GetById 18ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/trunk/Examples/chicken/overload/example.cxx

#
C++ | 33 lines | 25 code | 7 blank | 1 comment | 0 complexity | bfc80404dbfd8fb95adfff3ba34c7164 MD5 | raw file
 1/* File : example.c */
 2
 3#include "example.h"
 4#include <stdio.h>
 5
 6void foo(int x) {
 7  printf("x is %d\n", x);
 8}
 9
10void foo(char *x) {
11  printf("x is '%s'\n", x);
12}
13
14Foo::Foo () {
15  myvar = 55;
16  printf ("Foo constructor called\n");
17}
18
19Foo::Foo (const Foo &) {
20  myvar = 66;
21  printf ("Foo copy constructor called\n");
22}
23
24void Foo::bar (int x) {
25  printf ("Foo::bar(x) method ... \n");
26  printf("x is %d\n", x);
27}
28
29void 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}