home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / EXAMPLES / EX0901.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-13  |  406 b   |  15 lines

  1. // \EXAMPLES\EX0901.CPP
  2.  
  3. #include <iostream.h>
  4.  
  5. void print(int i) { cout << " Here is int " << i << endl;}
  6. void print(double  f) { cout << " Here is float " << f << endl;}
  7. void print(char* c) { cout << " Here is char* " << c << endl;}
  8.  
  9. void main()
  10. {
  11.    print(10);            // calls print(int)
  12.    print(10.10);         // calls print(double)
  13.    print("ten");         // calls print(char*)
  14. }
  15.