Article View: comp.std.c++
Article #653Can Standard C functions be overloaded?
From: Jamshid Afshar
Date: Wed, 11 Nov 1992 02:14
Date: Wed, 11 Nov 1992 02:14
19 lines
939 bytes
939 bytes
Can Standard C functions be overloaded? #include <string.h> int atoi(const String&); // legal? char* s = "123"; String str = "456"; int i1 = atoi(s); int i2 = atoi(str); One problem, I believe, is that ANSI C allows functions to be defined by the implementation as macros, so you might have to do: int (atoi)(const String& s); // now legal? String str = "456"; int i = (atoi)(str); // annoying Jamshid Afshar jamshid@emx.utexas.edu
Technical Details
Message-ID:
<83359@ut-emx.uucp>Path:
arc1-ca.pugleaf.net!sparky!uunet!know!cass.ma02.bull.com!think.com!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!natinst.com!news.dell.com!math.utexas.edu!ut-emx!emx.cc.utexas.eduShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!know!cass.ma02.bull.com!think.com!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!natinst.com!news.dell.com!math.utexas.edu!ut-emx!emx.cc.utexas.edu From: jamshid@emx.cc.utexas.edu (Jamshid Afshar) Newsgroups: comp.std.c++ Subject: Can Standard C functions be overloaded? Message-ID: <83359@ut-emx.uucp> Date: 11 Nov 92 02:14:41 GMT Sender: jamshid@ut-emx.uucp Organization: The University of Texas at Austin; Austin, Texas Lines: 19