HDTenEightyP/NetNews huggingface dataset:
From: euamts@eua.ericsson.se (Mats Henricson)
Subject: Re: Info on USL Standard Components Class Library ?
Keywords: USL class library
Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
Date: Mon, 14 Sep 1992 09:16:11 GMT

allan@stasys.UUCP (Allan Brighton) writes:

>Hi all,

>I'm trying to decide which general class library to use for a project.

>How does the "USL Standard Components" class library compare with 
>some of the "public domain" libraries like COOL, LEDA or NIHCL ?

USL SC has superior performance compared to the above libraries.

>Is the USL class library likely to become a standard for C++ -
>like libc for C ?

No, nothing in USL SC is going to be standard, except if they sell like
hell and is promoted to informal industry standard. Not very likely...

>Can someone tell me where you can get the USL library (for Sun) and how
>much it costs ?

I have no address, but send a mail to:
   tja@usl.com
Price: I think I shouldn't say, since it may vary... ???

>Is it available in source form ?

Yes, and if you have a close look you can find some rather kinky code.
Since performance is their main goal, they have done some things in a
rather unorthodox way... ;-)

>Is it available for Sun/Solaris 2.0 ?

I dunno at the moment, but I think you have to wait a bit longer for
that release.

Mats Henricson

Newsgroups: comp.lang.c++
Organisation: European Space Operation Centre (E.S.O.C)
Date: Friday, 11 Sep 1992 11:21:51 CET
From: Karl Keyte <KKEYTE@ESOC.BITNET>
Newsgroups: comp.lang.c++
Subject: Re: Answers on a postcard...

In article <1992Sep10.174914.838@taumet.com>, steve@taumet.com (Steve Clamage)
says:
>
>Karl Keyte <KKEYTE@ESOC.BITNET> writes:
>
>|#include <iostream.h>
>
>|class X {
>|   private:    int           value;
>|   public:     int           operator , (int i) { return i+10; };
>|               int           operator + (int i) { return value+i; };
>|               X &           operator = (int i) { value=i; return *this; };
>|};
>
>
>|void main()
>|{
>|   X         x;
>
>|   cout << "Value is " << (x=1, x+1) << endl;
>|}
>
>In the expression in parens, it is unspecified whether "x=1" or
>"x+1" is evaluated first.  They are arguments to the "operator,()"
>function, not the left and right side of a comma-expression.  If
>"x+1" is evaluated first, which is legal, it will use an
>uninitialized "x.value".
>
>Don't write code which depends on unspecified order of evaluation.
>
>If there were no "op,()", the "," would mark a comma-expression,
>and the "x=1" would have to be evaluated first; in that case the
>whole expression would be well-defined.

The implication of what you say is that it is not possible to overload
operators maintaining the correct functionality of the operator.  This
indeed means that precedence in overloaded operators cannot be maintained
if all operands are simply passed as arguments to the function implementing
the operator functionality and evaluated in a language independent order.
Imagine commonly used "chain" operators such as && and .

If what is described above is correct, and Mr.Clamage clearly has much
experience in the area, then I think we have justification for pressing
for a change in this area.  If not, I would ask: How does one overload
the comma operator while maintaining its attibutes as an operator?

Karl
From: rcox@cad734.NoSubdomain.NoDomain (Richard Cox)
Subject: iostreams inheritence question
Organization: Intel Corporation, Santa Clara, CA USA
Date: Mon, 14 Sep 1992 22:00:43 GMT

Please let me know if I am just being stupid or what?  

I am trying to develop a class from iostream and fstream which will
allow a common class for all I/O in my code.  I would like to make a
pointer of type ios <iostream.h> and make it point to cout.  cout is of
type ostream_withassign and derived from ostream which is derived from
ios.  In ARM pg. 197 (chap 10) shows the following example:

class base {...}
class derived : public base {...}

void f()
{
	derived d;
	...
	base * bp = &d;
}

I would like to do something like the following:

#include <iostream.h>
#include <fstream.h>

main () 
{
    ios &out = cout;
    out << "Grateful Dead" << endl;   // this is line #13
}

but I get the followin errors:

"streamT.C", line 13: error: bad operand types ios  char [14] for <<
"streamT.C", line 13: error:  function operand for  <<

The only thing I can determine might be causing a problem is that
ostream is delcared as:

class ostream : virtual public ios {...} 

but I thought that just allowed overloading of all the methods in ios.

Thanks in advance for the help...

-Rich

+-----------------------------------------------------------------------------+
|Rich Cox      	       	       	       	   E-Mail: rcox@scdt.intel.com 	      |
|CAD Developer                             AOL: Rich Kid                      |
|Intel Corp.  				   Mailstop: SC3-39     	      |
|      	       	        		   Phone: (408) 765-5199              |
|-----------------------------------------------------------------------------+
| These opinions are shared by everyone, I asked them...                      |
+-----------------------------------------------------------------------------+



-- 
+-----------------------------------------------------------------------------+
|Rich Cox      	       	       	       	   E-Mail: rcox@scdt.intel.com 	      |
|CAD Developer                             AOL: Rich Kid                      |
|Intel Corp.  				   Mailstop: SC3-39     	      |
|      	       	        		   Phone: (408) 765-5199              |
|-----------------------------------------------------------------------------+
| These opinions are shared by everyone, I asked them...                      |
+-----------------------------------------------------------------------------+
Newsgroups: comp.lang.c++
From: philipr@extro.ucc.su.OZ.AU (Philip Rhoades)
Subject: b-tree source for BC++ TVision?
Summary: Does anyone have source for btree prog on TVision?
Keywords: btree BC++ TVision
Organization: Sydney University Computing Service, Sydney, NSW, Australia
Date: Fri, 11 Sep 1992 05:32:24 GMT

I am looking for a simple, working prog that uses the btree
libraries for Turbo Vision on Borland's C++. I want to use it
for a small test database of students - about 1500 total and 
using their SID as a search key. I can't find any example 
progs anywhere.

-- 
Philip Rhoades
First Year Biology
University of Sydney
phil@biox.bio.su.OZ.AU or philipr@extro.ucc.su.OZ.AU
Newsgroups: comp.lang.c++
From: eburk@sfsuvax1.sfsu.edu (Eli Burk)
Subject: beginner, C++ & PC
Originator: eburk@sfsuvax1.sfsu.edu
Organization: San Francisco State University
Date: Sun, 13 Sep 1992 01:34:33 GMT

I have some experience programming C in Unix. I have questions
about C++ on ibm clones. I've never programmed on a PC before.

1) Current standards (I'm looking for a "current" book...)
I was in a bookstore and saw a new book current to the AT&T 
2.0 & 2.1 (quoting from memory - numbers may be wrong.) 
Does a defacto "standard" exist - if so what is it?

2) Borland C++ v. Microsoft C/C++
What is the compatibility of code written and tested in one
compiler and then compiled in another? 100%? I'd also like to
get opinions pro & con about each.

3) What do I need to buy to program on the PC? Is the Borland
"C++" package enough - or do I really need the much more
expensive "C++ w/Application Frameworks" & I have the same
question in reguard to Microsoft too. - btw what is SDK?

4) I don't "need" to start programming on the PC now. Should
I just wait for the release of NT. Is NT due in 93? I ask this
question because I have a 286 with 20M hd. It's going to be
necessary to buy a 486. For numerous reasons I've been 
programming on my university's Unix computers. I learned C 
first in Unix with the goal of then going to the PC (but I 
haven't gotten to the PC yet) - should I do that with C++ too? 

5) I have posted to comp.arch and pc.hardware trying to learn
about recent architecture/hardware like local bus. I recieved
few responces (2). Any suggestions on where to turn to for
information? I suppose the best way would be to read a "good"
book on architecture. I'm a fan of "nutshell books" - is
there a like publisher of books on pc architecture?

** thanks, and email please **

-- 
..out in the street, with your cheap fur on, or maybe your plastic raincoat
and your plastic shoes, they look good too, standing in the snow you're young-
er than you look, {fall in love with me} 2X, how i wish you would...[Iggy Pop]
eburk@futon.sfsu.edu -or- eburk@sutro.sfsu.edu -or- eburk@sfsuvax1.sfsu.edu
From: johns@trident.datasys.swri.edu (Stephen Johns)
Newsgroups: comp.lang.c++
Subject: ObjectCenter and MWM
Keywords: ObjectCenter and MWM
Date: 8 Sep 92 18:32:22 GMT
Organization: Southwest Research Institute, San Antonio, Texas

Admittedly somewhat of an off base question, but...

Does anyone have ObjectCenter working on a SPARC station running MWM as
their window manager?  ObjectCenter runs under MWM, but I am unable to
move, resize or change the stacking order of the windows.  Everything
is fine under OLWM.
-- 
Stephen Johns, Research Analyst
Southwest Research Institute, SA, TX 78228 (512) 522-5751
Newsgroups: comp.lang.c++
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: Reference to a pointer??
Keywords: pointer, reference
Organization: Computer Science, University of Melbourne, Australia
Date: Fri, 11 Sep 1992 09:20:45 GMT

ucosmo@mcl.ucsb.edu (Boris Burtin) writes:

>I have not been able to dig up any information on how to change a pointer 
>inside a function (aside from the good old dual-pointer C solution).  I know
>that, for example, an int can be changed in a function like so:
>
>void f(int& i)
>{
>	i = 0;
>}
>
>So why can't you do this:
>
>void f(int& *p)
>{
>	p = 0;
>}
>
>Or do I just have the syntax wrong?

Yes, what you have declared is a pointer to a reference to an int, which
doesn't make sense (it would just be the same as a pointer to an int).
Try

void f(int* &p) {
	p = 0;
}

-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature virus is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
From: matt@physics.berkeley.edu (Matt Austern)
Newsgroups: comp.lang.c++
Subject: Re: Proposal: Subscripting with multiple arguments
Date: 14 Sep 92 23:19:55 GMT
Reply-To: matt@physics.berkeley.edu
Organization: Lawrence Berkeley Laboratory (Theoretical Physics Group)
NNTP-Posting-Host: physics.berkeley.edu
In-reply-to: mrhagger@athena.mit.edu's message of 14 Sep 92 18:29:42 GMT

In article <1992Sep14.182942.1986@athena.mit.edu> mrhagger@athena.mit.edu (Michael R Haggerty) writes:

> I have been using C++ for numerical work, and one of the changes which would
> be most useful would be to allow the subscription operator to take multiple
> parameters.  This would make it much simpler to define classes for multi-
> dimensional matrices without the nuisance of having to define a helper class.
> The concept should not be such a shock to anyone, as the subscript operator
> is already allowed to take non-integer arguments so is already significantly
> extended from the C subscript operator.

I've also occasionally wished that I could define, say, 
	operator[](int,int,int), 
and for the same reason: multi-dimensional arrays.  I haven't wished
for it very often, though, because that isn't really the syntax that I
want for a multi-dimensional array anyway; I would much rather access
an array element using the syntax A[i][j] than using the syntax
A[i,j].  After all, the A[i][j] syntax is what you would use if you
were using built-in data types instead of classes, and it's nice to
keep some things the same when defining a class.  (For that matter,
there isn't really anything wrong with the syntax A(i,j), either.)

Of course, if you want to use the A[i][j] syntax then you have to
define a helper class, but that's not too horrible a burden: you
really shouldn't be defining array classes very often anyway, but
should just do it once, and do it right.

What I find to be a bigger problem, actually, is designing an array
class that works for arrays with an arbitrary number of dimensions.
There's no problem with defining the classes Array1, Array2,
Array3,..., and that's exactly what I've done, but it's annoying and
inelegant.  Has anyone out there come up with a good definition for
arrays with an arbitrary number of dimensions? ("Good," in this
context, means specifically that array reference is sufficiently well
optimized that an intelligent programmer wouldn't mind using this
class in an inner loop.)
--
Matthew Austern                   Just keep yelling until you attract a
(510) 644-2618                    crowd, then a constituency, a movement, a
austern@lbl.bitnet                faction, an army!  If you don't have any
matt@physics.berkeley.edu         solutions, become a part of the problem!
From: rjf@thunder.Berkeley.EDU (Russell Fleming)
Newsgroups: comp.lang.c++
Subject: Re: const * const return value
Keywords: const pointer
Date: 9 Sep 92 13:41:20 GMT

In article <1992Sep7.210827.10793@sci.kun.nl>, leo@sci.kun.nl (Leo
Willems) writes:
> 
> Is the returntype const char * const legal when it is assigned to a
const char*:
> 
> const char * const
> f()
> {
> 	return "aa";
> }
> 
> void
> x()
> {
> 	const char * p = f();   // legal assignment??
> 
> 	++p;			// sigh
> }
> 
> cfront 3.0.1 is accepting this, according to me it breaks the meaning
> of a const pointer to const. Is there an explanation?
> 

Cfront 3.0.1 is correct in accepting your code without complaint.  Your
example can be re-written as:
	const char * const a = "aa";
	const char *p = a;

The description for 'a' is a const pointer to a const memory location. 
The description for 'p' is a pointer to a const memory location.  The
principal difference here is that the variable 'a' may not be modified
while the variable 'p' may be modified.  NOTE, I said the variable and
not the memory location pointed to by the variable.  The only way the
meaning of a const pointer to const could be broken is if the compiler
allowed the variable 'a' to be modified.

If the compiler could not accept your code fragment, then the following
code fragment could also not be accepted by the compiler since it is, in
essence, the same thing:

	const int a = 5;
	int p = a;

Once again, the const declaration for the variable simply means that the
variable itself may not be modified, but it is perfectly acceptable to
transfer the variable's contents to another variable which allows modification.

=================================================================
Rusty Fleming, Software Consultant @ Tandem Computers Inc.
email: rjf@mpd.tandem.com            Austin, Texas
voice: (512) 244 - 8390              USA
Xref: sparky comp.lang.c++:13539 comp.std.c++:1157
From: matt@centerline.com (Matt Landau)
Newsgroups: comp.lang.c++,comp.std.c++
Subject: operator delete[] and NULL
Date: 11 Sep 1992 18:30:55 GMT
Organization: CenterLine Software, Inc.
NNTP-Posting-Host: 140.239.1.32
Summary: Is delete[] NULL well-defined?

Speaking of operator delete[], is the effect of calling delete[] on NULL
well-defined?  The ARM says plainly that "delete NULL" is legal, and a 
no-op, but I couldn't find anything explicit about "delete[] NULL", nor
could I find any implication that operator delete and operator delete[]
must behave the same way.

The reason I ask is that, with USL cfront 2.1.12, I have found code that
crashes intermittantly when asked to delete[] NULL.  I'm wondering if the
code is correct and cfront is buggy, or vice versa.
--
 Matt Landau			Waiting for a flash of enlightenment
 matt@centerline.com			  in all this blood and thunder
Newsgroups: comp.lang.c++
From: farrar@adaclabs.com (Stephen Daedalus)
Subject: C vs. C++
Keywords: c++ advocacy
Organization: ADAC Laboratories
Date: Fri, 11 Sep 1992 20:43:33 GMT

The software engineers at my company (including myself) are trying to "sell"
C++ to our management.  In order to do so, it would be useful to have
"testimonials" from people who have made the change from C to C++.  These
testimonials should deal with quantitative data as much as possible.
-New applications can be written in X% of the time
-We found X% fewer bugs
-Code maintenance costs went down by X%
Any other data that would make a successful "sales pitch" would be appreciated.

Please email me directly rather than post.
---
Richard Farrar		These views are my own, not my company's or country's.
ADAC Laboratories	"A man without hand is not a man."
farrar@adaclabs.com		- George Costanza, Seinfeld
From: jac@moonshine.llnl.gov (James A. Crotinger)
Newsgroups: comp.lang.c++
Subject: Re: Proposal: Subscripting with multiple arguments
Date: 15 Sep 92 16:59:36 GMT
Organization: Magnetic Fusion Energy - LLNL

tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
> What you can do, however, is to share a lot of code among the
> different array classes. For example, you might have your
> multidimensional array inherit from your 1D array.

  Not publicly, I hope. There is no "is a" relationship in that
direction. (Well, you can say that a 2D array of floats is a 1D array
of 1D arrays of floats, but that's not the same as inheritance since
the types of the 2D and "outer" 1D arrays are different.)  In one of
our class libraries we did implement "Vector" (1D array) as inheriting
from "Matrix" (2D array). This makes sense since a Vector is just a
Matrix with only 1 column. Thus you can safely pass a Vector to any
function which operates on Matrices, etc. You would not want to try to
do the reverse.

> 					Thomas.

  Jim
--
-------------------------------------------------/\--------------------------
James A. Crotinger     Lawrence Livermore N'Lab // \ The above views are mine
jac@moonshine.llnl.gov P.O. Box 808;  L-630 \\ //---\  and are not neces-
(510) 422-0259         Livermore CA  94550   \\/Amiga\  sarily those of LLNL.
Newsgroups: comp.lang.c++
From: manne@Minsk.docs.uu.se (Magnus L|vkvist)
Subject: BC++ bug list
Keywords: BC++ bug list
Organization: UDAC, Uppsala, Sweden
Date: Wed, 9 Sep 1992 18:41:42 GMT

Is there a bug list for Borland C++ available?

/Magnus
From: mccall@mksol.dseg.ti.com (fred j mccall 575-3539)
Subject: Re: GOTO, was: Tiny proposal for na
Organization: Texas Instruments Inc
Date: Wed, 9 Sep 1992 20:50:14 GMT

In <rmartin.715526582@thor> rmartin@thor.Rational.COM (Bob Martin) writes:


>Now, granted, there are some cases where the rules of Structure
>Programming do not create the most efficient possible code.  And in
>cases where efficiency is of primary importance, then the rules should
>be violated, without regret.

There are also places where the rules of Structured Programming do not
create the most READABLE or MAINTAINABLE code, either.  In these
cases, as well, they should be jettisoned.  This is the problem with
having a set of 'usual rules'.  Meeting the rules becomes more
important to some people than meeting the goals that the rules are
supposed to be helping you with.

-- 
"Insisting on perfect safety is for people who don't have the balls to live
 in the real world."   -- Mary Shafer, NASA Ames Dryden
------------------------------------------------------------------------------
Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.
From: jac@moonshine.llnl.gov (James A. Crotinger)
Newsgroups: comp.lang.c++
Subject: Re: iostreams inheritance question
Date: 15 Sep 92 17:08:15 GMT
Organization: Magnetic Fusion Energy - LLNL

rcox@cad734.NoSubdomain.NoDomain (Richard Cox) writes:
> main () 
> {
>     ios &out = cout;
>     out << "Grateful Dead" << endl;   // this is line #13
> }

> but I get the followin errors:

> "streamT.C", line 13: error: bad operand types ios  char [14] for <<
> "streamT.C", line 13: error:  function operand for  <<

  The problem is that it is iostream which provides all of the
operator<<() and operator>>() definitions. ios doesn't have such
member functions, so the above code doesn't make sense.

  On the other hand, fstream does inherit from iostream. Thus 
you should be able to just declare "out" to be a reference to
an iostream, and initialize it with an fstream if you want to
do file I/O. 

  Jim
--
-------------------------------------------------/\--------------------------
James A. Crotinger     Lawrence Livermore N'Lab // \ The above views are mine
jac@moonshine.llnl.gov P.O. Box 808;  L-630 \\ //---\  and are not neces-
(510) 422-0259         Livermore CA  94550   \\/Amiga\  sarily those of LLNL.
Newsgroups: comp.lang.c++
From: jdl47513@uxa.cso.uiuc.edu (Jason Lowe)
Subject: Problems with reference function and consts
Organization: University of Illinois at Urbana
Date: Tue, 15 Sep 1992 23:07:03 GMT
Keywords: const

I am sorry if this is in a FAQ somewhere...

I have a class that overloads the [] operator, returning a reference to type
int.  I also have a const declared ie:

const errorval = -1;

When I try to return errorval in the overloaded operator[] function, CC gives
me a warning about temporary variable reference (not lvalue or incorrect type)

If I ignore the warning, the code runs incorrectly.  Is it possible to return
a reference to a const?  If so, what is wrong?  Please email and thanks in
advance!



-- 
Jason Lowe      |   //       | Take the Oath.  Watch Ren and Stimpy!
stimpy@uiuc.edu | \X/ Amiga! | "And look, he's beating up on our cheese!"

Newsgroups: comp.lang.c++
From: steve@taumet.com (Steve Clamage)
Subject: Re: malloc or new in c++
Organization: TauMetric Corporation
Date: Thu, 10 Sep 1992 17:01:32 GMT

hwrvo@kato.lahabra.chevron.com (W.R. Volz) writes:

|Let me get this straight: Are you saying that there is a problem of using
|malloc in a c++ program? I realize that if I malloc some memory, then
|I need to free it with free(). And if a create a new object with new, then I
|delete with delete. I wouldn't 'free' an object allocated with 'new' and 
|'delete' an object allocated with 'malloc'. But if there is an incompatibility 
|in c++ between (malloc,free) and (new,delete), I don't know how one can mix
|any program that uses both allocatation schemes.

As long as you do what you have said here, there should be no problem.
I don't know of a C++ implementation that won't allow malloc/free
and new/delete in the same program.  The C++ Standard will require
that these be allowed to appear in the same program.

You do have to be careful about not using malloc for an object with a
constructor or destructor, and about not mixing styles on the same
object.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
Newsgroups: comp.lang.c++
From: waitd@columbia.dsu.edu (Darrin K. Wait)
Subject: New C++ user needs some help.
Keywords: C++ help program
Organization: Dakota State University
Date: Sun, 13 Sep 1992 19:24:51 GMT

Hello C users.

	I am very new to C++ programing and would like some advice.

	I am trying to write a C++ program that will take command line input 
when running the compiled EXE program.  I am sure the answer can be found in 
the C++ manuals, but all I have is the text book "C++ By Example" (This 
program isn't for the class).

	What I am trying to do is say take the following input:

		Program.exe word1 word2 ...

	I would then like to take this input and use it.

	Please mail any replies to WAITD@COLUMBIA.DSU.EDU

	Thanks in advance.
Newsgroups: comp.lang.c++