From: "mpt" Newsgroups: comp.os.msdos.djgpp Subject: virtual problems Date: Fri, 8 Jan 1999 14:06:37 -0000 Organization: uwcc Lines: 66 Message-ID: <7753dg$ft3$1@loki.cf.ac.uk> NNTP-Posting-Host: lab10.cs.cf.ac.uk X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Here is a test program I wrote and compiled (or tried to) using DJGPP. It's just a trifle to test the effectiveness of the virtual mechanisms in C++ (new boy, you see). When I compiled it as it is, the linker reported several invalid references to Thing functions, nodes and tables. When I put some braces on the ends of the function definitions within the Thing class, the linker was happy (why?). However, even in this happy state, the program would: a) return a bizarre long integer from the first Thing in the vector, b) return the same string whichever Thing the second extraction used thingVec[ 0 ] or [ 1 ]), and c) not fire the Thing_a and Thing_b print functions. Help! Pardon the rude words in the code - as you might guess, this problem has really rammed my rectum. M http://www.cs.cf.ac.uk/User/M.P.Tidball/index.html begin 666 inher001.cpp M(VEN8VQU9&4\:6]S=')E86T^#0HC:6YC;'5D93QS=')I;F<^#0HC:6YC;'5D M93QV96-T;W(^#0H-"F-L87-S(%1H:6YG#0I[#0H)<'5B;&EC DOT AT T*"2 @( EV M:7)T=6%L(&EN="!N=6UB97(H*3L-"B @(" @(" @"79I