HDTenEightyP/NetNews huggingface dataset:
From: peter@gort.trl.OZ.AU (Peter K. Campbell)
Subject: BC++/TC++ 3.1 <scrnsave.h> =??? HELP ?!
Summary: Borland does it again
Keywords: screen saver, missing files
Organization: Telecom Research Labs, Melbourne, Australia
Date: Tue, 26 Jan 1993 04:11:10 GMT

Howdy out there.

I have a screen saver for windows which I am trying to compile using
Borland C++ 3.1 and/or Turbo C++ for Windows 3.1 (we've got both here
at work), & I have a problem.

Yes, I hear you say, this is to be expected, but the problem is not
the usual bugs (I've put the 3 BC++ 3.1 fixes on), but just stuff
completely missing.

The screen saver makes use of functions in <scrnsave.h>, i.e.
DlgGetPassword, DefScreenSaverProc, DlgChangePassword and
DlgInvalidPassword.  I know these are in <scrnsave.h> because
the help files for BOTH BC++ & TCW++ tell me all about it when
I get keyword help (Ctrl-F1) on the above keywords.  However,
I've done global searches throughout the entire directory structure
of both programs & I cannot find the header file, or the appropriate
library file.

As far as I remember I done full installations on both programs.
Unfortunately I can't find anything in the manuals either - we had
3.0, & when we got the upgrade to 3.1 the only new book we got
was the 3.1 installation manual, which was about as useful as
an ashtray on a motorbike, so I've struck out there.

Does anyone know where the files are?  Is there something on one
of the innumerable install disks I have to put on manually?  Is
there a bit I missed?  Is this stuff available from a anonymous
ftp site?  Or do I have to wait until the next release comes out?

BTW, I heartily advise & support using GCC/DJGPP for UNIX/DOS
program final compilation, and BC++ for the development environment -
I can get (computationally intensive) programs to run an average of 30%
faster on IBMs under DJGPP's 32 bit protected mode than BC++, and even
15+% faster than the Intel Code Builder.

Unfortunately I'm stuck with Borland or Microsoft for Windows
development, however :-( ;-).

Thanks in advance
Peter K. Campbell
p.campbell@trl.oz.au

#include <std.disclaimer>
Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Question of scope
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Wed, 27 Jan 1993 15:31:40 GMT

In article <1993Jan22.184558.21397@porthos.cc.bellcore.com> chw@bellcore.com writes:
>
>A (novice) question about scope.

	Not a novice question! One thats got the committee
stumped.
> 
>void foo(Base *p) 
>{ 
>  p->Draw(); 
>} 
> 
>Anyway, does the following call the destructor just after returning
>from the foo?
> 
>   foo(& Derived1());
> 
>Does it have any ugly portability problems? 

	Yes. The lifetime of temporary objects is not well
defined yet. The code

	void foo(const Base &b)
	{
		b.Draw();	
	}

is safer since any compiler that deleted the temporary argument

	foo(Derived1());

would invalidate a lot of code. But even this is not
yet guarranteed to be safe (although it probably will be
in the Standard).


-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;------ SCIENTIFIC AND ENGINEERING SOFTWARE ---ph:  2 799 8223 --------
Newsgroups: comp.lang.c++
From: twallace@gmuvax2.gmu.edu (Todd Wallace)
Subject: Re: name of object
Organization: George Mason University, Fairfax, Va.
Date: Thu, 28 Jan 1993 17:36:02 GMT

Here is an odd question for the OOP gurus:
Is there a way for an object to know its own name?

For instance, let's say we declare the following class:
class Lemon {
	public:
	//some stuff
};

void main(void)
{
	Lemon A,B,C;

	A.tell_me_your_name;
	B.tell_me_your_name;
	C.tell_me_your_name;
}

and I would like the output to be:
A
B
C

Therefore, I have to declare a member function for Lemon that
can look up its own name.

Can it be done? It would help a lot with debugging.


----------------------------------------------------------------
|    Todd Wallace               |  "A pessimist is surprised   |
|    twallace@gmuvax2.gmu.edu   |   as often as an optimist,   |
|                               |   but always pleasantly."    |
|                               |            - Robert Heinlein |
----------------------------------------------------------------
From: hendrik@vedge.com (Hendrik Boom)
Newsgroups: comp.lang.c++
Subject: Re: Safe version of C++
Date: 25 Jan 93 22:13:01 GMT
Organization: Visual Edge Software Ltd.

hendrik@vedge.com (Hendrik Boom) writes:
: hlf@nic.cerf.net (Howard Ferguson) writes:
: : I am wondering about overloading operators and const objects. 
: : Do any of you netters have any opinions on these areas, or
: : any other area of C++ which could be dropped to produce a 
: : restricted version of the language for simplicity and safety.
: 
: Someone a few months ago posted an announcement that to their
: great surprise, they managed to define a safe subset of C, so safe
... 
: Please let me know, by email or public posting, if anyone DEOS locate this
: sublanguage.

It appears that this safe, garbage-collectible C++ was/is-being devised by 
Dave Detlefs and John Ellis, who will post an announcement when their paper
is ready.  It includes a safe subset of C whose use precludes
invalid pointers.

: -- 
: -------------------------------------------------------
: Try one or more of the following addresses to reply.
: at work:	hendrik@vedge.com,  iros1!vedge!hendrik
: at home:	uunet!ozrout!topoi!hendrik
-- 
-------------------------------------------------------
Try one or more of the following addresses to reply.
at work:	hendrik@vedge.com,  iros1!vedge!hendrik
at home:	uunet!ozrout!topoi!hendrik
Newsgroups: comp.lang.c++
From: robert@alkymi.unit.no (Robert Schmidt)
Subject: Is (p) instead of (p!=NULL) portable? 
Organization: Norwegian Institute of Technology
Date: Mon, 25 Jan 93 12:56:27 GMT


In PC C's, the NULL pointer is defined with a bit pattern of all zero's,
and the constructs 
      if (p)
and
      if (!p)
checks for NULL and non-NULL respectively.  Is this portable to *all*
platforms?


Robert
From: gs4t@virginia.edu (Gnanasekaran Swaminathan)
Newsgroups: comp.lang.c++
Subject: Re: operator = with inheritance
Date: 26 Jan 93 19:44:48 GMT
Organization: University of Virginia

pjcondi@ns.pacbell.com (Paul Condie) writes:
: 	A * obj3 = new B (1);
: 	A * obj4 = new B;
: 
: 	*obj4 = *obj3;			// works for pointer types

The problem then becomes how does one prevent the following
or better yet how does one handle gracefully the following:
	A a;
	*obj4 = &a; // call B::operator = (const A&)

The solution that you provided casts an A object
into a B object with surprising results.
Newsgroups: comp.lang.c++
From: robertd@kauri.vuw.ac.nz (Robert Davies)
Subject: Re: setjmp/longjmp question
Organization: Victoria University of Wellington
Date: Fri, 29 Jan 1993 04:14:22 GMT

kanze@us-es.sel.de (James Kanze) writes:
....

>As a more general rule, you can emmulate exceptions with
>setjmp/longjmp, if you accept that all of your class objects derive
>from a common base class, which determines (in some machine dependent
>fashion) whether the object is on the stack or not, and if it is,
>registers it.  This is definitely non-trivial, though, and in the
>presence of multiple inheritance, you'd better be sure that your
>compiler does virtual base classes right, too.  (GNU definitely has
>problems, and I have heard that Borland does too.)  Also, it has a
>non-negligible run-time overhead.
....
My matrix package newmat07 (which is available on the ftp sites that
archive comp.sources.misc) does this. I expect it is a little compiler 
dependent, but it does seem to work. And it certainly simplifies the
handling of exceptions.

Come on real exception handling!

Robert


Newsgroups: comp.lang.c++
From: uzzell@netcom.com (David Uzzell)
Subject: extern structs
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Thu, 28 Jan 1993 23:09:20 GMT

ubj:  extern structs Adv Windows Prog
  To:  All
From:  David Uzzell             71031,1411
I am trying to find a clean way to do something that is probably not
good C++ programming.  I have a C++ code generator that transfers data
for dialog boxes via a struct defined as extern. This seems to require
that I set the maximum number of items that can appear in a listbox at
compile time. I don't want to do that.

Let's say I have a dialog box with a listbox and an editbox. This will
generate a struct like so:

	extern struct
		{
			listItems[50][26]
			editItem[25]
		} ListData;

I want to define the listItems member of ListData such that it is 1 row
by 26 columns at compile time, and at run time request the exact amount
of RAM I need from the Windows global heap, put the listbox data there,
and redefine listItems to point there.

I think that ListData should actually consist of 2 far pointers, and all
I have to do is change the one that points to the listbox data. But I
can't figure out the syntax to do it.

Is there an assignment statment I can write that will let me alter a
pointer in an extern struct, effectively allowing me to reallocate an
external array while retaining global access and keeping the same array
name?

Thanks.
David

uzzell@netcom.com
uzzell@netcom.com
D
From: hoffman@sol.crd.ge.com (Bill Hoffman)
Newsgroups: comp.lang.c++
Subject: Public Domain C++ Interpreter
Keywords: C++, interpreting
Date: 26 Jan 93 20:22:04 GMT
Organization: GE Corporate Research & Development, Schenectady, NY


	


	I would like to know if such a thing exits.  I know of the ObjectCenter
product, but that is not in the budget for this project.  Thanks in advance.


	-Bill Hoffman (hoffman@crd.ge.com)
From: dak@tabaqui.informatik.rwth-aachen.de (David Kastrup)
Newsgroups: comp.lang.c++
Subject: Re: How does one use 68000 subroutines with C++ ???
Date: 22 Jan 93 00:02:24 GMT
Organization: Rechnerbetrieb Informatik - RWTH Aachen
Distribution: world
NNTP-Posting-Host: tabaqui.informatik.rwth-aachen.de

nh@cbnewsg.cb.att.com (nicholas.hounsome) writes:

>From article <C1640F.54y@cs.uiuc.edu>, by ctaylor@cs.uiuc.edu (Conrad Taylor):
>>          I was wondering , is there anyway to use assembly language
>> routines with C++?  I'm using SunOS operating system with AT&T 2.1
>> CC compiler (cfront).  Thanks in advance to all that reply to this     
>> post.

>The easiest way is to declare them as extern "C" and write them as 
>you would for C.

>Usualy this means A6 is the frame pointer, A0,A1 & D0,D1 are scratch
>registers and the arguments are pushed onto the stack in reverse order
>by the caller who removes them after the call. results are usualy
>returned in D0. 

>Almost everyone does it this way except gnu.

You forgot to mention that you CAN do it with gnu as well, of course,
I mean there is nothing in simply writing a piece of Assembler and linking
it in.

But GNU has the much more ingenious possibility to intertwine Assembler
fragments into high level code without call overhead, without getting
the optimizer tumbling down because he does not know what registers
you use, and even without worrying about addressing modes, because
the compiler will fill them in, load them into registers if more
appropriate. Small wonder GNU programmers almost never take the
pains of separate assembler modules.

I have yet to see a more convenient, performance penalty free way
of imbedding assembler.
From: shabi@prometheus.UUCP (Shabi Farooq)
Newsgroups: comp.lang.c++
Subject: testing
Keywords: testing
Date: 27 Jan 93 02:24:57 GMT
Organization: Consilium Inc

Testing....
-- 
====================================================================
Shabi Farooq					Consilium, Inc.
(415) 691-6209					640 Clyde Ct.
shabi@consilium.com				Mtn. View, CA  94043
====================================================================
From: hlf@nic.cerf.net (Howard Ferguson)
Newsgroups: comp.lang.c++
Subject: Re: C++FAQ
Date: 27 Jan 1993 01:14:11 GMT
Organization: CERFnet Dial n' CERF Customer Group
NNTP-Posting-Host: nic.cerf.net
Keywords: Need a recent copy of...

In article <C1HDLF.DqE@boi.hp.com> bobhof@hpwala.wal.hp.com (Bob Hoffmann) writes:
>This is actually my first post to a news group, although I have been a subscriber to many.  I am requesting that a copy of the FAQ for this group
>(comp.lang.c++) be posted, as I am very interested in obtaining as much info 
>on C++ programming and OOP concepts as I can.  Thanks in advance.
>

faq for comp.lang.c++ is
Via ftp - Anonymous ftp from sun.soe.clarkson.edu [128.153.12.3] :pub/C++/FAQ

	hlf
>////////////////////////////////////////////////////////////////////////////


Newsgroups: comp.lang.c++
From: eb@ascent.com (Ed Barton)
Subject: Re: Inheriting from cooperating classes (was: HELP : Array of objects...)
In-reply-to: rowley@base.cs.ucla.edu's message of 27 Jan 93 20:13:30 GMT
Date: 28 Jan 93 10:11:51
Organization: Ascent Technology, Inc., Cambridge Massachusetts

In article <rowley.728165610@base.cs.ucla.edu> rowley@base.cs.ucla.edu (Michael T Rowley) writes:
   ...
   Problem: other classes in the library (e.g. LIST) create instances of
   LIST_ELEMENT.  They won't use your new derived class!

   I believe this is a problem with any class that has instances created
   by other library classes.
   ...
   I can think of two mechanism which could solve this problem:

[When you are designing a library,]

   1) Never use another class from within a class.  Use only constrained
   generic parameters (parameterized types).  Thus a generic list class
   would need to be declared LIST[LIST_ELEMENT,MEMBER_TYPE], or, if you
   made a subclass LIST[NEW_LIST_ELEMENT,MEMBER_TYPE].  It's a little
   less ugly if generic parameters could have defaults, as in Sather 1.0.

   Any other ideas?

IMO, this is an unnecessarily strong constraint.  For the cases where
the new auxiliary objects are dynamically allocated by the library, I
would suggest instead that the class (LIST, here) should have a
virtual function that it uses to create the auxiliary objects, instead
of using "new" directly.  That way, a subclass of LIST can use a
subtype of LIST_ELEMENT objects if that's what is needed.

(Of course, not every class, and not every auxiliary class, is
designed for inheritance.  The library designer has to think ahead and
decide whether or not to support inheritance.  This discussion is
therefore confined to the cases where the possibility of subclassing
is supported.  It's a design flaw if subclassing is excluded without
good reason, of course.)









Newsgroups: comp.lang.c++
From: kanze@us-es.sel.de (James Kanze)
Subject: Re: Question of scope
Organization: SEL
Date: 28 Jan 93 16:38:59

In article <1993Jan22.184558.21397@porthos.cc.bellcore.com>
chw@bellcore.com (Charlie Woloszynski,MRE 2J-278,8295228,,27143)
writes:

|> I have a class Base from which I derive several additional classes, as in:

|> class Base 
|> { 
|>   virtual Draw(); 
|> } 

|> class Derived1 : public Base 
|> { 
|>   virtual Draw(); 
|> } 

|> I need to pass a pointer to an instance of one of these derived classes 
|> to a function (so I can make use of the derived functions) like:

|> void foo(Base *p) 
|> { 
|>   p->Draw(); 
|> } 

|> Now I generally need to create the Derived classes only to pass them
|> to foo.  I don't want these instances to exist after the call to foo.

|> Anyway, does the following call the destructor just after returning
|> from the foo?

|>    foo(& Derived1());

|> Does it have any ugly portability problems? 

Is this even legal?  I do not believe that Derived1() is an lvalue,
and so you should not be able to take its address.  (There is a lot of
discussion of this at present in the ANSI committee.)

What you probably want to do is to define foo as follows:

	void
	foo( const Base& obj )
	{
		obj.draw() ;
	}

Of course, "draw" would have to be declared "const".  But since you
are attempting to use it on temporary objects, this is probably what
you want anyway.

You could then call foo with:
	foo( Derived1() ) ; 
with supposedly no problems.  This should work, as a temporary object
used to initialize a reference has the same lifetime as the reference,
which should keep it around until you return from the function.
--
James Kanze                             email: kanze@us-es.sel.de
GABI Software, Sarl., 8 rue du Faisan, F-67000 Strasbourg, France
Conseils en informatique industrielle --
                   -- Beratung in industrieller Datenverarbeitung
From: eggert@rbg.informatik.th-darmstadt.de (lars eggert)
Newsgroups: comp.lang.c++
Subject: FREE C++ development environments?
Date: 27 Jan 1993 09:33:37 GMT
Organization: TU Darmstadt
Distribution: world
NNTP-Posting-Host: rbhp44.rbg.informatik.th-darmstadt.de

We are going to start with a large project in about two months time
(a compiler for EIFFEL), and we are just collecting the development tools.

Are there any FREE C++ development environments? We are using SUNs and
HPs running SUN-OS and HP-UX. What are they like? Where to get them?
What experiences have you made with them? Which tools are included
(project management, code version management, class browser, etc)?

We were using HP SoftBench, since this is the only one currently installed
at our site, but it doesn't run on SUNs and gets quite slow when it's being
used by three or more persons at the same time. But something similar
(or better!) would be fine.

Thanks,
Lars Eggert (eggert@rbg.informatik.th-darmstadt.de)
Some things are so snazzy they never go out of style!
Like tail fins... And bubble domes... And shag carpeting...
-- Homer, designing a car, "Oh Brother, Where Art Thou?"

Newsgroups: comp.lang.c++
From: nh@cbnewsg.cb.att.com (nicholas.hounsome)
Subject: Re: Is (p) instead of (p!=NULL) portable? 
Organization: AT&T
Date: Tue, 26 Jan 1993 09:17:08 GMT

From article <1993Jan25.125627.29030@ugle.unit.no>, by robert@alkymi.unit.no (Robert Schmidt):
> 
> In PC C's, the NULL pointer is defined with a bit pattern of all zero's,
> and the constructs 
>       if (p)
> and
>       if (!p)
> checks for NULL and non-NULL respectively.  Is this portable to *all*
> platforms?
> 
> 
> Robert

It is NOT portable for C.
It is portable for C++ which is the group that you have posted to -
did you mean to?

#define NULL (void*)0
if(p==NULL)

This is WRONG in C++ and right in C.
(char*)0 is even worse in C++.

Newsgroups: comp.lang.c++
From: an8339@anon.penet.fi
Subject: FAQ on C++
Organization: Anonymous contact service
X-Anonymously-To: comp.lang.c++
Date: Tue, 26 Jan 1993 14:53:59 GMT


Hello,
       If there is an FAQ on C++, can anyone inform me that where to get it from
, or mail it to me.
Thanks

-sanjay

 email: m-sj7228@cs.nyu.edu

-------------------------------------------------------------------------
To find out more about the anon service, send mail to help@anon.penet.fi.
Due to the double-blind system, any replies to this message will be anonymized,
and an anonymous id will be allocated automatically. You have been warned.
Newsgroups: comp.lang.c++,comp.object
From: samantha@shell.portal.com (Samantha Atkins)
Subject: Re: Pros and cons of C++
Organization: Portal Communications Company -- 408/973-9111 (voice) 408/973-8091 (data)
Date: Tue, 26 Jan 1993 06:21:50 GMT

In article <MUTS.93Jan12100059@PMCS.estec.esa.nl> muts@estec.esa.nl (Peter Mutsaers) writes:
>>>On Thu, 7 Jan 1993 15:15:22 GMT, yjohn@gpu.utcs.utoronto.ca (John Ross) said:
>
>  John> I have recently come to grips with having to learn C++; mainly due to
>  John> the bandwagon effect. It doesn't look like there will be any pure C
>  John> programmers left in a couple of years.  I agree that the language is
>  John> very complex, and has many shortcomings.  
>
>  John> Why then is it becoming so popular?  Why the deluge of texts,
>  John> articles, magazines, news groups, compilers, etc?  It seems to
>
>Because it is not complex, especially not if you already know C.
>Sometimes pureness was offered to compatability with C, but that of
>course also is an advantage. With minimal extra syntax (=> easy to
>learn and remember) full OO support was added. If you look at the

Syntax is not, it seems to me, the *main* problem.  The problem is the semantics
and behavior of the language.  Items like order of construction, object data 
layout, order of destruction, automatic object copies with not always so
simple semantics and implications to name only a few.  I am quite good at
learning new languages and achieving fluency.  C++ took me about 3 times 
longer than anything else I've encountered to date.

>The implications can be complex, but that is more due to OO than to
>C++ in particular. But it pays for most applications.

While I grant that their are some interesting and often overlooked 
implications of using OO it is not, imo, true that C++ complexity is
limited only to those.

>
>IMHO the main criticism on C++ is that it does not *enforce* pure OO
>structured programs. On the other hand, I, and many other programmers,
>don't like to be forced too much in a direction and I think I can have
>my own discipline to do things right, and like to have the freedom to
>brake the pure rules in the rare cases where that is advantageous. Of
>course most managers prefer other languages so that they can control
>you better (like Ada).

Freedom to break the rules is a very nice formula for anarchy.  My main
problem with C++ is that the rules are not clearer in their derivation,
interplay or application.  This means that it is not easy to apply or 
understand or predict program behavior NOT that I or you enjoy more freedom.  

___________________________________________________________________________
Samantha Atkins				| Object Oriented Training, 
Object Enterprises			| Consulting and Products
---------------------------------------------------------------------------
From: shan@cs.unc.edu (Yen-Ping Shan)
Newsgroups: comp.lang.c++
Subject: Tom Cargill
Date: 26 Jan 1993 14:39:12 -0500
Organization: The University of North Carolina at Chapel Hill
NNTP-Posting-Host: hatteras.cs.unc.edu
Keywords: contact address

Can anyone tell me how to contact Tom?  Since I don't monitor this
news group, would you send your response to shan@carvm3.cary.ibm.com?

Thanks in advance.

---Shan---
From: ar630@cleveland.Freenet.Edu (Kevin White)
Newsgroups: comp.lang.c++
Subject: Anybody know anything about Visual C++?
Date: 28 Jan 1993 21:23:31 GMT
Organization: Case Western Reserve University, Cleveland, OH (USA)
Reply-To: ar630@cleveland.Freenet.Edu (Kevin White)
NNTP-Posting-Host: hela.ins.cwru.edu


There was a quick reference in the newest issue of PC Week concerning
Microsoft's C++.  (Page 3 I think it was).  They didn't have much info,
just that it was coming.  Does anybody know anything??

Kev
-- 
Kevin White      Internet:ar630@cleveland.freenet.edu
"The things you say, your purple prose just gives you away.
The things you say.  You're Unbelieveable."
           ---EMF, "Unbeleieveable"
Newsgroups: comp.lang.c++