TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: David Nugent
from: steven pasztor
date: 1996-11-16 12:37:00
subject: Re: #defines

So to David Nugent do I speak these words:


Thursday October 31 1996 01:58, David Nugent wrote to Frank Adam:


 #define's are fun things...  Good for making your programs virtually
unreadable before handing in to lecturers...  ;-)  Although they don't seem
quite as good as TASM macro's...  Or am I just missing something again?


 DN> Obfuscate

 The "in word" of AUST_C_HERE...  So far, I've yet to see
anywhere, on fidonet or otherwise, in which that word appears more than
once a year!  Yet in here, it's appeared enough for the rest of them...

 Or maybe it's just that C programmers feel the need to make up for the
rather short length of their favorite language's name?

 There must be a reason...  Somewhere...


 Anywayz, onto matters of much more importance...


 Say, anyone good at explaining how to do that inheritence thing?  (I'm
using both Borland C++, and the Unix G++ these days...)  But in trying to
do the inheritance thing, I seem to be missing something...  I create an
object, but I don't know how to create a second object which inherits bits
from the first. (Or rather, I don't know how to USE the first object's bits
via the second object).  Sheesh...  If anyone can actually understand what
I just said, you're a bloody fantastic person...  :-)

 Lets try an example...  (In pascal, I'm afraid!)

type
  SmallOne= object
    { constructor and all that here }
    Function  InheritedThing(MyOne: SmallOne): Integer; virtual;
    Procedure PolymorphicThing(Blooh: Integer); virtual;
  end;
type
  BigOne= object(SmallOne)
    { the usual stuff again... }
    Procedure PolymorphicThing(Blooh: Integer); virtual;
  end;
var
  SmallThing: SmallOne;
  BigThing: BigOne;

 Given those variables (pretend the constructors have been called and all
that), BigThing.PolymorphicThing(BigThing.InheriedThing(BigThing)) would
pass BigThing to SmallOne.InheritedThing(), the result of which would go to
BigOne.PolymorphicThing().

 How do I do that in C?  These darn BC++ books are no help, and we don't do
it in uni till sometime next year...  And even then it'll probably be
mid-semester by the time we get around to anything that complicated...  :-)


nevets


... Advice void, if I'm incorrect!
--- FMailX 1.02
* Origin: HELP!!! (3:632/103.123)
SEEN-BY: 633/267 270
@PATH: 632/103 348 360 50/99 635/728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.