| delorie.com/archives/browse.cgi | search |
| Newsgroups: | comp.os.msdos.djgpp |
| From: | rd5718 AT irix DOT bris DOT ac DOT uk (Rich Dawe) |
| Subject: | Re: Pointers to functions. |
| X-Nntp-Posting-Host: | irix.bris.ac.uk |
| Message-ID: | <F8HK06.9Gq@fsa.bris.ac.uk> |
| Lines: | 15 |
| Sender: | usenet AT fsa DOT bris DOT ac DOT uk (Usenet) |
| Organization: | University of Bristol, England |
| X-Newsreader: | TIN [UNIX 1.3 950824BETA PL0] |
| References: | <7b9jku$o7o$1 AT news6 DOT svr DOT pol DOT co DOT uk> <36D9BD2F DOT A05C8E55 AT cartsys DOT com><CqyGOCASqC42EwDb AT dunvegan1 DOT demon DOT co DOT uk> <7br6n8$897$1 AT news6 DOT svr DOT pol DOT co DOT uk><7bu8hk$6b6$1 AT camel19 DOT mindspring DOT com> <u79p7SA2Ls42EwHc AT xemu DOT demon DOT co DOT uk> <7bunlf$f86$1 AT camel29 DOT mindspring DOT com> |
| Date: | Fri, 12 Mar 1999 14:24:05 GMT |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Lark (rlarkatmbhsdotedu) wrote:
: Doesn't function overloading accomplish the same thing? For example -
: int add(int, int);
: float add(float, float);
: char * add(char *, char *);
You can't do function overloading in C though. This is why
function pointers are useful. You can create function tables and simulate
object-orientation in some form.
--
==============================================================================
Rich Dawe - 4th-year MSci Physicist @ Bristol University, UK
richdawe AT bigfoot DOT com, http://www.bigfoot.com/~richdawe/
==============================================================================
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |