TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: david nugent
from: steven pasztor
date: 1996-05-02 00:42:00
subject: Re: Objects

So to david nugent do I speak these words:


Wednesday May 01 1996 04:11, david nugent wrote to steven pasztor:


 sp>> Hey mate!  Yeah you!  I'm talking to you!
 dn> Sigh.

 Yeah, I know...


 sp>> I've read the Borland C++ language guide, but it's a
 sp>> terrible thing to read... Anyone got a simple way of
 sp>> explaining the usage of objects in BC++?
 dn> Do you want a summary of all the known and unknown laws in the
 dn> universe while I'm at it? :-)

 Don't see why not!


 dn> It's a large topic.

 I am aware of that...  I was refering more to the basics of creating and
useing an object, as BC++ implements it.


 dn> Get and read some good documentation (not
 dn> necessarily C++ specific) on object oriented programming and design.

 I am familiar with the theory of objects in general.  I have read a number
of books going into object orientated design.  I try to implement such
practices in my BP programs when appropriate (although Borland's
implementation of objects isn't terribly efficient...).


 dn> Classes are merely the vehicle used in C++ - you should first look at
 dn> and understand the theory, and then the method itself makes a lot more
 dn> sense.

 Yes yes yes.....  Let me make a simple statement, which should clear up
many of these little misunderstandings.  I primarially use two products for
my programming.  Borland Pascal v7 and Borland C++...  I am moving from
Pascal to C++ because I wish to use some of the features that compiler
provides which the Pascal one doesn't.  Such features as overloading and
the ability to derive an object from more than one ancestor (or something
like that...). I'm not one of these people who are obsessed with the
various C standards, I don't have a heart attack every time I hear someone
talking about classes in C.  etc. etc. etc........


 dn> Any OOP language has a similar construct, whether it be called
 dn> an "object" (as in Borland Pascal), a "package"
(in ADA) or whatever.

 I was aware that the term "package" was used, and now I know
where...  Thank you for that...  Now, if you know the answer to this
relatively simple question, could you give it?  (if not, than just say so)

 When creating an object (class) in BC++, how do you specify the
constructors, destructors, inline functions, and stuff like that.  When
using an object, how do you reference the methods and variables, when when
do you use a given method?  Exactly how do you create and destroy an
instance (the new and delete commands I presume...  how do you control
which constructor/destructor is being used?)  That is what I meant to ask
for.


 sp>> Is the implementation consistant with other C[++] compilers?
 dn> Yes, although it depends on which version of the compiler you're
 dn> referring to.

 Cool...  Thanks.


 sp>> And for a rather BIG question:  Anyone got source code
 sp>> that will tear out the individual elements of a piece
 sp>> of BC++ source code? ie. turn the statements:
 sp>> #include 
 sp>> void main() {
 sp>> int Num=42;
 sp>> cout << "Greetings" << Num << endl;
 sp>> }
 sp>> into a series of "things" something like:
 sp>> # include  void main ( ) { int num = 42
 sp>> ; cout << "Greetings" << Num << endl ; }
 dn> G'z, yuck. Why would you want to do that?  :-)

 Call me a masochist...  (I think that's the word...  It's not one I use
often and my memory has a habit of forgetting things like that after a
while...)


 dn> Are you looking for an obfuscator? They do exist for C, but I'm not
 dn> sure about C++ - I've never seen one, at any rate, which is not to say
 dn> they don't exist.

 No...  What I actually want to do is be able to read a C++ source file,
and put it back together a little differently...  Not much, but sufficient
that being able to seperate out the individual tokens would be quite handy.


nevets


... Affix stamp, post office will not deliver without postage.
--- FMailX 1.02
* Origin: HELP!!! (3:632/103.123)
SEEN-BY: 50/99 78/0 620/243 623/630 632/103 348 360 998 633/371 634/388 396
SEEN-BY: 635/301 502 503 506 544 639/252 711/401 409 410 413 430 808 809 932
SEEN-BY: 711/934 712/515 713/888 714/906 800/1 7877/2809
@PATH: 632/103 348 635/503 50/99 711/808 809 934

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™.