Various C++ Examples (including IPC)  Version: 1.0.0
overload.cc File Reference

simple overloading example More...

#include <stdio.h>
Include dependency graph for overload.cc:

Go to the source code of this file.

Functions

int thing1 ()
 
int thing1 (int i)
 
double thing2 ()
 
double thing2 (int i)
 
int main (int argc, char **argv)
 

Detailed Description

simple overloading example

Definition in file overload.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 37 of file overload.cc.

References thing1(), and thing2().

38 {
39  int x;
40  double y;
41 
42  x = thing1();
43  x = thing1(1);
44 
45  y = thing2();
46  y = thing2(1);
47 }
double thing2()
Definition: overload.cc:24
int thing1()
Definition: overload.cc:12

Here is the call graph for this function:

int thing1 ( )

Definition at line 12 of file overload.cc.

Referenced by main().

13 {
14  printf( "thing1\n");
15  return 1;
16 }
int thing1 ( int  i)

Definition at line 18 of file overload.cc.

19 {
20  printf( "thing1a\n" );
21  return 0;
22 }
double thing2 ( )

Definition at line 24 of file overload.cc.

Referenced by main().

25 {
26  printf( "thing2\n");
27  return 'x';
28 }
double thing2 ( int  i)

Definition at line 29 of file overload.cc.

30 {
31  printf( "thing2a\n" );
32  return 0;
33 }