image provider

Overload


Here is an email I received in response to one of my essays.

Overload : Jonathan Anderson : andersjl@letu.edu : 2000-10-09

Here’s a good C++ one:

Make liberal use of the operator , That’s right, you can overload a comma. Here’s an example:

Guess what it prints — f int. It could be made better by putting all the functions in different headers. You could even stick the operator and define in a header and include it some places and not in others so that sometimes you call f(string, int) and other times f(int) with the same parameters. This one could be truly evil and even allow you to 'call' forms of f that shouldn’t even exist, or make the operator, modify the data as well.

Endless amounts of fun await!!


This page is posted
on the web at:

http://mindprod.com/feedback/unmain/overload.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\feedback\unmain\overload.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[18.119.105.239]
You are visitor number