Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why error occur for overloading function

0 views
Skip to first unread message

LiuKang

unread,
Mar 20, 1999, 3:00:00 AM3/20/99
to
Hellow! I have written a program with some overloading function like bellow:
In head file:
class A
{
......
void V(void);
void V(float);
void V(String);
void V(String (*)());
void V(void (*)(Frame&));
void V(float (*)());
......
}
In source file, I'v written like bellow first:
......
void A::V() { .....} (function 1)
void A::V(float v) { ...... } (function 2)
void A::V(String v) { ...... } (function 3)
void A::V(String (*p)()) { ...... } (function 4)
void A::V(void (*p)(Frame&)) { ...... } (function 5)
void A::V(float (*p)()) { ...... } (function 6)
I'v used VC++ 5.0 to compile it, but there were 104 errors occur from
function 4. It's still have 31 errors after puting function 4 ahead function
3, and finally no any error occur after put function 4 ahead function 2, and
put function 5 ahead function 3. Could you any one tell why it does this.
Email to me please( li...@zg-public.sc.cninfo.net). Thanks a lot.
Liu Kang

Doug Harrison

unread,
Mar 21, 1999, 3:00:00 AM3/21/99
to
LiuKang wrote:

Compiler bug. Apply Service Pack 3 if you haven't already; it may have been
fixed. I doubt you'll see any bug fixes for an "old" compiler, so IMO it's
only worth reporting if it occurs in VC6, but the above is obviously not
compilable. If you post a short, compilable example, that demonstrates the
problem in VC5, someone will probably let you know how VC6 does with it!

--
Doug Harrison
dHar...@worldnet.att.net


0 new messages