home *** CD-ROM | disk | FTP | other *** search
- #include <stream.hpp>
- overload foo;
-
- void foo (int x)
- {
- cout << "foo(int)\n";
- }
-
-
- void foo (double x)
- {
- cout << "foo(double)\n";
- }
-
- void foo (char x)
- {
- cout << "foo(char)\n";
- }
-
-
- main()
- {
- int i;
- char c;
- float f;
-
- // Zortech test only.
- foo (i); // int
- foo (c-32); //i.e. char converted to upper case
- //this call calls foo(int) and not foo(char).
- foo ((char)(c-32)); //but this one worked.
- foo (f); // float becomes double
- }
-