HDTenEightyP/NetNews huggingface dataset:
From: khcheng@unix.amherst.edu (KIM HONG CHENG)
Subject: software for sale MS C/C++,CrossTalk,WinFAX Pro
Organization: Amherst College
X-Newsreader: TIN [version 1.1 PL7]
Date: Wed, 16 Dec 1992 13:49:33 GMT

MS C/C++ 7.0 + SDK 3.0
* still in plastic wrap (never been used)
* registration card included
* 45 lb of manuals
* All for $200 (new > $300)

CrossTalk for Window
* modem software for windows
* still in plastic wrap (never been used)
$ 50 (new $119)

WinFax Pro 2.0 for windows
* still in plastic wrap (never been used)
* $ 30 (new $70)

(Both CrossTalk + WinFax for $75)
From: gordie@duts.ccc.amdahl.com (Gordie Freedman)
Newsgroups: comp.lang.c++
Subject: Do temps hurt performance of overloaded +
Date: 16 Dec 1992 23:57:58 GMT
Organization: Happy hacker bait and tackle shop
Distribution: world
Reply-To: gordie@duts.ccc.amdahl.com
NNTP-Posting-Host: moon.kaleida.com

If I do the following to overload binary + for a class, will temporary
objects be created? And if so, what can I do to prevent this, to get the best
performance?



#include <stdio.h>

// Class definition
class Complex
{
public:
	Complex (void) : real(0.0), imaginary(0.0) {}
	Complex (Complex& c) : real(c.real), imaginary(c.imaginary) {}
	Complex (float x, float y) : real(x), imaginary(y) {}
	friend Complex operator + (Complex& x, Complex& y);
	void print (void);
	
private:
	float real;
	float imaginary;
};

// Print routine
void Complex::print (void)
{
	fprintf (stdout, "Real %g, imaginary %g\n", real, imaginary);
}

// Overloaded + operator
inline Complex operator + (Complex& x, Complex& y)
{
	return Complex (x.real + y.real, x.imaginary + y.imaginary);
} 

// Main test routine
int
main (int argc, char** argv)
{
	Complex a(1, 2), b(10,20), c;
	Complex* dp;

	c = a + b;
	dp = new Complex (c + b);

	c.print();
	dp->print();
	return 0;	
}	

	
---
Gordie Freedman: gordie@kaleida.com Sigs are for kids


Newsgroups: comp.lang.c++
From: pjl@cs.uiuc.edu (Paul Lucas)
Subject: Re: overload = for pointers? redefine pointer decl syntax?
Organization: University of Illinois at Urbana-Champaign
Date: Sun, 20 Dec 1992 22:31:39 GMT

In <lj9otuINN7ll@boogie.cs.utexas.edu> wilson@cs.utexas.edu (Paul Wilson) writes:

>Are there any C++ compilers that let me define my own overloaded
>versions of (normally) builtin operations on builtin types?  In
>particular, I'd very much like to be able to redefine the way
>operator = works on pointers, for garbage collection purposes.
>(And maybe redefine it for all primitive types, for checkpointing
>purposes.)

*****>	If there are, they violate the language; your code would not
	be portable.

-- 
	- Paul J. Lucas				University of Illinois	
	  AT&T Bell Laboratories		at Urbana-Champaign
	  Naperville, IL			pjl@cs.uiuc.edu
Newsgroups: comp.lang.c++
From: roger@genie.UUCP (Roger H. Scott)
Newsgroups: comp.lang.c++
Subject: Re: Virtual base classes
Keywords: virtual, class
Date: 14 Dec 92 00:20:19 GMT
Reply-To: roger@genie.UUCP (Roger H. Scott)
Organization: proCASE Corporation, Santa Clara, CA

In article <1992Dec8.192759.24081@cs.brown.edu> sdm@cs.brown.edu (Scott Meyers) writes:
>In article <rmartin.723768537@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
>| ... There is nothing that can be done with private inheritance that cannot
>| be done, just as simply, with containment.
>
>Except for redefining virtual functions and accessing protected members.

If Kludge is a non-public subclass [derived class] of WellFormed then there
isn't much point in talking about Kludge redefining WellFormed's virtual
functions since you can't use a Kludge in a place where a WellFormed is
expected (i.e., who would ever have hold of a Kludge and send it one of
WellFormed'd messages [call one of WellFormed'd virtual functions], other than
a member function of Kludge?).
Newsgroups: comp.lang.c++
From: erc@netcom.com (Eric Smith)
Subject: Re: Survey: File Extension
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Date: Wed, 16 Dec 1992 23:45:17 GMT

In article <1992Dec16.095946.18938@planet.bt.co.uk> njs@planet.bt.co.uk writes:
>Who are you trying to kid?  I've been using this language for years and I have only seen .ccp with my Zortech stuff, and I changed that real quick.  I like .cc, and having .cpp on UNIX platform which has a cpp executable might be a bit confusing for some people.


You are saying don't use .cpp because there is a cpp executable, but it's
ok to use .cc?  Are you implying that you think there is no cc executable,
or what?

What is the advantage of cc over cpp?  Just that it is 2 characters instead
of three?  Is that a big advantage worth a flame war?  The fact is that the
MS-DOS, etc., C++ compilers are being used by so many C++ programmers now
that .cpp is becoming the standard by default.  Borland and Microsoft both
use it, not just Zortech.  I've also seen it used by other less known brands
of compilers.
Newsgroups: comp.lang.c++
From: mat@mole-end.matawan.nj.us
Subject: Re: Give me safe C++
Summary: The _right_ amount of flexibility ...
Organization: :
Date: Mon, 14 Dec 1992 19:05:53 GMT

In article <1992Dec12.145403.26483@ucc.su.OZ.AU>, maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
> In article <WARSAW.92Dec11124441@anthem.nlm.nih.gov> warsaw@nlm.nih.gov (Barry A. Warsaw) writes:

> >>>>>> "Michael" == Michael Feathers <feathers@serss0> writes:

> >    Michael> ... I think that C and C++ are versatile languages precisely
> >    Michael> because no one ever tried to limit their functionality
> >    Michael> with good intentions.

> >Agreed. IMHO, the real power of C++ as a development language is the
> >ability to easily climb up and down the abstraction ladder depending
> >on the context of the problem.  Sometimes you need to mingle with the
> >bits in the basement, sometimes you just need ADTs and sometimes you
> >really want to do OOP.  ...
 
> 	And I think you tend to miss exactly where rigid restrictions on
> functionality are the things which *yield* the very power you desire. ...
> Function pointers ... are ... more powerful ... than mere virtual functions. 

> 	What makes virtual functions so useful is the fact that they
> are so tightly restricted .. for example, unlike a genuine
> function pointer they cannot be modified after object creation, ...
 ...
> 	So when language designers propose restrictions, one must
> carefully weigh up the pros and cons: most restrictions also
> grant freedom.  ...

Absolutely.  But some languages would give you the virtual functions and
take away the function pointers!

The point is, I think, having the right tools for the job at hand.  Your
high-level tools should be good enough that you'll never think of using
anything else for a job they can do.  But when they can't do the job--or
more likely, a small part of the job--you shouldn't have to forsake your
high-level tools entirely as a punishment for once using a down-and-dirty
approach.

And  _that_ , I think, is one of great virtues of C++.  Whether you think
of it as `seamless' or just forgiving, it's there.
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile

 mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
Newsgroups: comp.lang.c++
From: John C. White <white@ils.nwu.edu>
Subject: Re: Define WIN30/WIN31 ?
Organization: The Institute for the Learning Sciences
X-Useragent: Nuntius v1.1
Date: Tue, 15 Dec 1992 16:06:39 GMT

In article <1ge3raINN5k3@agate.berkeley.edu> Jeffrey C. Ely,
jeff@emily10.Berkeley.EDU writes:
>Just as an experiment I added the line #define WIN30.  I got past that
fatal 
>error only to get a whole bunch of new errors, the first of which were
four 
>repetitions of "Cannot access Object.H"  Why are there errors in
Borland's
>own example source files and header files ?!?  I know I'm missing
something. 
>Can anyone help?
>

This option is settable via the option/compiler/something/something... of
the IDE. Dig in there, you'll see it.
Newsgroups: comp.lang.c++
From: pjl@cs.uiuc.edu (Paul Lucas)
Subject: Re: Looking for C++ for the MAC
Organization: University of Illinois at Urbana-Champaign
Distribution: usa
Date: Fri, 18 Dec 1992 20:59:18 GMT

In <1992Dec18.091823.9501@iscsvax.uni.edu> to5232@iscsvax.uni.edu writes:

>I am looking for a C++ compiler for the MAC.  I know of Zortech but I am still
>not sure that they still produce it.  Can someone tell me of any C++ compilers
>for the MAC and where I can buy it from?

	MPW C++ from Apple (APDA) is the only other.
-- 
	- Paul J. Lucas				University of Illinois	
	  AT&T Bell Laboratories		at Urbana-Champaign
	  Naperville, IL			pjl@cs.uiuc.edu
From: hendrik@vedge.com (Hendrik Boom)
Newsgroups: comp.lang.c++
Subject: Re: register variables in inline functions
Date: 15 Dec 92 19:25:33 GMT
Organization: Visual Edge Software Ltd.

dwr@cci632.cci.com (Donald W. Rouse II) writes:
: In article <1992Dec10.003109.25441@bilver.uucp> dandrews@bilver.uucp (Dave Andrews) writes:
: >In article <1992Dec9.011428.11178@aplcen.apl.jhu.edu> ded@aplcen (nod sivad) writes:
: >>In the past, to speed up a C function's performance, one would
: >>declare frequently used variables as "register."  
: >>But what happens with a C++ inline function?  Does declaring
: >>the variables as "register" offer any hope of greater speed?
: >>
: >>Supposedly, compilers are so sophisticated nowadays that
: >>the "register" keyword is unnecessary. 
: >>
: >My understanding is that both "register" and "inline" may be ignored
: >by your compiler.  They are only hints.
: >
: >- David Andrews
: >  dandrews@bilver.oau.org
: >
: 
: MY understanding is that "inline" may be replaced with "static",
: but it may not be ignored.

In 
class foo{
	int i;
	inline int bar(){ return i;}
	};
inline cannot be replaced with static.
-- 
-------------------------------------------------------
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++,comp.sys.unisys
From: dold@unislc.uucp (Clarence Dold)
Subject: Re: C++ on Unisys U6000?
Organization: Unisys Corporation SLC
Date: Tue, 15 Dec 1992 19:25:09 GMT

From article <BzB8B7.4B3@unccsun.uncc.edu>, by pfschell@unccsun.uncc.edu (Patrick F Schell):

> If you know of a C++ implementation available on the U6000, please
From the Intel iABI listings.  These should work on the U6000...

NDP C++ - MicroWay (508) 746-7341 - Native
Computer Innovations (908) 542-5920 - Translator
Oregon Software (503) 624-6883 - Native

> Really Jim Perry, but you can think of me as Pat Schell for now...
Jim Perry, formerly of Convergent, Inc?

-- 
---
Clarence A Dold - dold@unislc.slc.Unisys.COM
               ...pyramid!ctnews!tsmiti!dold
From: grk@ccwf.cc.utexas.edu (Glenn R. Kronschnabl)
Newsgroups: comp.lang.c++
Subject: libg++ and Sun C++ 2.1
Date: 16 Dec 92 19:37:14 GMT
Reply-To: grk@ccwf.cc.utexas.edu (Glenn R. Kronschnabl)

Howdy,

I would like to use libg++, however, I am tied to the Sun C++
2.1 compiler so I can't use gcc unfortunately.  The libg++ dist
says it is 2.x compliant (I believe).  Has anyone already done
this?  I gave it an attempt, but I went down in flames.

Thanks for any info.

Regards,
Glenn
----
Glenn R. Kronschnabl
UT-Austin (but an Aggie at heart!)
I didn't do it, you didn't see me do it, you can't prove anything!

Internet: grk@ccwf.cc.utexas.edu



Newsgroups: comp.lang.c++
From: dwr@cci632.cci.com (Donald W. Rouse II)
Subject: Re: Operator "new" - how to catch array-allocation?
Organization: [Computer Consoles, Inc., Rochester, NY
Date: Tue, 15 Dec 1992 17:26:22 GMT

In article <1992Dec14.143339.26314@daimi.aau.dk> sabroe@daimi.aau.dk (Morten Sabroe Mortensen) writes:
>
>As you know, it's possible to attach a special 'new' operator on a
>specific class, -something like
>
>...
>
>class A
>{
>  ...
>
>public:
>  void* operator new(size_t s);
>}
>
>...
>
>So, well, -when doing something like
>
>A* a=new A;
>
>the new 'new' for my class A is used, but when doing something like
>
>A* a=new A[25];
>
>the global new operator is used, it seems! Can it be true, it should
>work like this? Until I tried, I thought, A's 'new' would just get a bigger
>argument - but maybe there is a very good reason, it works like this?
>Please tell me about it! No way to catch array-allocation for a class? 
>Same question goes for 'delete'. Comments and explanations greatly
>appreciated!

It's because an array of A is not type "A"; it's type "array of A",
which is something entirely different.
BS explains this somewhere in his book.
It would be nice to be able to easily specify a "new" operator
for things like "array of A", "pointer to A", etc.
(I realize you can do this with a wrapper class, but it's not easy.
Maybe someone out there has templates for this?)
From: jk@cs.man.ac.uk (John Kewley)
Newsgroups: comp.lang.c++
Subject: Re: Improvements on C++?
Date: 16 Dec 92 13:17:52 GMT
Reply-To: jk@fiveg.icl.co.uk
Organization: ICL Computers Limited, EDS Project
To: mucs!nessie!uknet!mcsun!uunet!haven.umd.edu!darwin.sura.net!sgiblab!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh

I have always used whitespace to emphasize the difference:

	while ((p= get()) != 0) {...}
                ^^^
This means whenever I type in if (a = b), I usually spot it as looking wierd
immediately. This has virtually eliminated one of the most common, or so I believe,
C++/C bugs from our code.

Note this style looks REALLY wierd to start with, but you soon get used to it.
--
        John M Kewley
 
ICL Computers Limited, Wenlock Way, West Gorton, Manchester. M12 5DR
Tel: (+44) 61 223 1301 X2138  Email: jk@fiveg.icl.co.uk or jk@cs.man.ac.uk
From: deanp@peg.pegasus.oz.au
Newsgroups: comp.lang.c++
Date: 19 Dec 92 19:10 EST
Subject: Re: Looking for C++ for the MAC
Nf-ID: #R:1992Dec18.091823.9501@iscsvax.un:-140517111:peg:497700005:000:481
Nf-From: peg.pegasus.oz.au!deanp    Dec 19 19:10:00 1992


>I am looking for a C++ compiler for the MAC.  I know of Zortech but I am still
>not sure that they still produce it.  Can someone tell me of any C++ compilers
>>for the MAC and where I can buy it from?

I use the Apple CFront translator & the MPW C compiler... a bit slow but
a nice system... I have never seen a Zortech compiler in action but I'm told
it's faster (no translation step)...

Both are available from APDA... try an Apple dealer or a technical mac
magazine...

dean

Newsgroups: comp.lang.c++
From: jimad@microsoft.com (Jim Adcock)
Subject: Re: A modest proposal...
Date: 14 Dec 92 21:47:14 GMT
Organization: Microsoft Corporation

In article <1gb99tINNr06@matt.ksu.ksu.edu> danodom@matt.ksu.ksu.edu (Dan Odom) writes:
|This group is for the discussion of the C++ language (and occasionaly
|the Unix implementations of it).  Please take your MS-DOS specific
|questions to comp.os.msdos.programmer next time.

I disagree.  First, there is nothing in comp.lang.c++'s charter that
makes it any more un*x specific, than say NT or OS/2 specific.
Secondly, if you read comp.os.msdos.programmer or whatever newsgroup,
you will find that the vast majority of questions asked on comp.lang.c++
*are* being targeted appropriately -- in that other groups deal even less
in the kinds of questions asked than comp.lang.c++.  If comp.lang.c++ 
is the most pertinent group, then that is where the question should be asked.

There have been questions targeted inappropriately recently, for example
all the stuff on random numbers, or encryption, or whatever.  By all means
take these questions elsewhere.

Note that these kinds of issues have been raised many times before with one or 
more C++ subgroups being the target of "you don't belong here."  To date, such
comments have not resulted in new notes groups being formed, although you
are welcome to try to start such a new notes group, if you like.

The success of C++ and comp.lang.c++, if any, is due to the willingness of
a great and varied group of people with greatly differing political, 
philosophical, and operational alligences, to come together around a
shared area of concern, namely C++, putting aside their alligences 
[to such extent humanly possible ;-] within this notes group.
From: andy@federation.gatech.edu (Andy Register)
Newsgroups: comp.lang.c++
Subject: Re: Should char arrays be deleted with delete[]?
Keywords: C++
Date: 18 Dec 92 18:53:13 GMT
Organization: CERL-EE, Georgia Institue of Technology

In article <1992Dec18.161338.28124@promis.com> fogel@promis.com (Richard Fogel) writes:
>Should char strings allocated as follows:
>
>char *str = new char[10];
>
>later be deleted by:
>
>delete []str   OR    delete str  ?


To quote from Meyers, "In the case of an object type like char that has no
destructor, this issue isn't important, but in general this is something
you do not want to forget.  *Always* make sure that you use [] with 
delete if and only if you used [] with the corresponding call to new."

Item 11 btw.

So, use either syntax for str but I would advocate using the [] syntax
so that you get used to it and automatically use it in cases
where it matters.

Toodles
Andy
From: sam4628@zeus.tamu.edu
Newsgroups: comp.lang.c++
Subject: Re: IS C++ a language for the "average programmer"
Date: 15 Dec 1992 10:34 CST
Organization: Texas A&M University, Academic Computing Services
Distribution: world
NNTP-Posting-Host: zeus.tamu.edu
News-Software: VAX/VMS VNEWS 1.41    

In article <rmartin.724431509@thor>, rmartin@thor.Rational.COM (Bob Martin) writes...
..
> 
>This is not a new idea.  Calculus is more complex than algebra.  Yet,
>once learned, it alows a whole new ream of concepts to be conveniently
>expressed.  If we did not learn calculus, we would founder in our
>attempts to describe a large number of phenomina.  
> 
> 
>--
>Robert Martin                        Training courses offered in:
>R. C. M. Consulting                       Object Oriented Analysis
>2080 Cranbrook Rd.                        Object Oriented Design
>Green Oaks, Il 60048 (708) 918-1004       C++

Yes, but does OO _really_ allow you to tackle a more complex problem?
Or does it just allow you a new "notation" which is conveniently adapted
to the more complex type of problems?  I've never heard of a programming
goal which absolutely required OO to achieve it -- however, there are
a large number of math problems which algebra just cannot solve, no
matter how you manipulate it (assuming, of course, that you don't start
making simplifying assumptions/approximations).

------------------------------------------------------------------------
| Steven A. McCluney                 |"Strange women lying in ponds    |
| sam4628@zeus.tamu.edu              | distributing swords is no basis |
| I'm a grad student, so my opinions | for a system of government!"    |
|    are worthless anyway            |          Dennis, to King Arthur |
------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: John C. White <white@ils.nwu.edu>
Subject: Re: Define WIN30/WIN31 ?
Organization: The Institute for the Learning Sciences
X-Useragent: Nuntius v1.1
Date: Tue, 15 Dec 1992 16:05:44 GMT

In article <1ge3raINN5k3@agate.berkeley.edu> Jeffrey C. Ely,
jeff@emily10.Berkeley.EDU writes:
>Just as an experiment I added the line #define WIN30.  I got past that
fatal 
>error only to get a whole bunch of new errors, the first of which were
four 
>repetitions of "Cannot access Object.H"  Why are there errors in
Borland's
>own example source files and header files ?!?  I know I'm missing
something. 
>Can anyone help?
>

This option is settable via the option/compiler/something/something... of
the IDE. Dig in there, you'll see it.
Newsgroups: comp.lang.c++
From: engelsma@golden.cps.msu.edu (Jonathan Engelsma (Reid))
Subject: Re: C++ Coroutine Class?
Organization: Michigan State University, CPS Department
Date: Thu, 17 Dec 92 14:55:33 GMT

In article <Bz8A08.63C@csn.org>, bhays@teal.csn.org (Boyd Hays) writes:
|> Hello,
|>   I'm trying to use the AT&T C++ task classes on a SUN using CC3.0.1.
|>   It is unclear to me how to have a task yield the processor without
|>   that task becoming IDLE. I'm running on a Sparc and SUN doesn't 
|>   distribute the source so I can't figure it out.
|> 
|>   1) Does anyone know how to have a task relinquish the processor?

Yes, executing the member function task::delay() will cause the 
executing task to relinquish the processor.  The state of that task
is still RUNNING.  
 
|> 
|>   2) Is a more complete example than that provided with the documentation
|>      available anywhere?

In the USL documentation that was provided with my compiler, there
is a section entitled "System Time and Timers".  The above information
was discussed in that section.   This section of the manual was taken
from a paper by Stroustrup and Shopiro.  Anybody have a more precise
reference for us?

|> 
|>   3) In Tony Hansen's book "The C++ Answer Book" it mentions that the
|>      solution to problem 7.10 (the new and improved tasking system) does
|>      not run on a Sparc. Is this true, or does anyone have a set of diffs
|>      that will allow it to work?

Haven't read that book so I can't comment on this.    What is the new
and improved tasking system you are referring to?  Is that different than
the one provided with CC3.0?  

|> 
|> Thanks in advance,
|> Boyd Hays
|> bhays@csn.org
|> 

-------------------------------------------------------------------------
Jonathan R. Engelsma                            Michigan State University
                                                     Department of
E-mail:   engelsma@cps.msu.edu                     Computer Science
	  uunet!frith!engelsma	
	  uunet!frith!jresys!engelsma (home)	
-------------------------------------------------------------------------


Newsgroups: comp.lang.c++
From: krnorton@rodan.acs.syr.edu (Karen R. Norton)
Subject: Question Re. Integer Template Arguments
Organization: Syracuse University, Syracuse, NY
Date: Sat, 12 Dec 92 17:51:03 EST


What I would like to do is something like the following:
------------------------------------------------------------------------
template <int i> class C {
  ....
};

template <int i1, int i2> C<i1+i2> f(C<i1> c1, C<i2> c2) {
  return C<i1+i2>(....);	//Call constructor with some args.
}
------------------------------------------------------------------------
Unfortunately even tho' this works with g++ 2.3.2, the ARM expressly
forbids this (pg. 347 - "All template-args for a function template must be
type-arguments.").

An attempted work-around:
------------------------------------------------------------------------
template <int i> class C {
public: enum {D= i}; ....
};

template <class C1, class C2> C<C1::D + C2::D> f(C1 c1, C2 c2) {
  return C<C1::D + C2::D>(....);	//Call constructor with some args.
}
------------------------------------------------------------------------
Unfortunately, g++ 2.3.2 gives an error when compiling the return type for
f() - it claims that C1 and C2 are not aggregates.  It has no problems with
the similar construct used in the constructor in the return value (I proved
this by instantiating the return type manually, while leaving the return
value expression unchanged).

I have the following questions:

1.  What is the reason for the restriction on template-args for function
templates?  The rationale presented in the ARM appears to be too weak a
reason for such a strong restriction.  The restriction given on pg. 280 of
Stroustrup2 ("Each template argument of a function template must affect the
type of the function by affecting at least one argument type of functions
generated from the template.") appears much more reasonable than the
restriction given in the ARM. 

2.  Is my work-around incorrect C++, or does g++ have a problem?

[If replying by email, please use the following email address, as I am
posting from a friend's account on another machine].

Thank you.

Zerksis D. Umrigar
(umrigar@bingsuns.cc.binghamton.edu)
Newsgroups: comp.lang.c++,comp.os.msdos.programmer