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";
- }
-
- main()
- {
- int i;
- char c;
- float f;
-
- foo (i); // int
- foo (c); // char becomes int
- // Zortech gives syntax error: cannot tell which function foo() to call
- foo (f); // float becomes double
- }
-