HDTenEightyP/NetNews huggingface dataset:
From: steve@taumet.com (Steve Clamage)
Subject: Re: Answers on a postcard...
Organization: TauMetric Corporation
Date: Sun, 13 Sep 1992 16:00:33 GMT

Karl Keyte <KKEYTE@ESOC.BITNET> writes:

>...  In overloading, for
>example, the '+' operator for one of my own classes, I would try to provide
>functionality which fits with the usual understanding of the operator.  In
>providing '+' for "strings" I would hope to offer concatenation rather than
>truncation with the '+' operator.  That works quite well.  If I require
>something which is unrelated to any operator I would rather not overload
>but provide a member function...

This is a very commendable programming style, and I recommend it to
everyone.  It isn't a language rule, however, and probably would not
be enforceable by a compiler if it were.

>To do what I have just described with the comma-operator in C++ is not
>possible. [ in the sense of preserving order of evaluation ]

Just what we have been saying.  In consequence, I suggest that you
do not overload the comma, but use a non-operator function instead.

If a major concern is preserving order of evaluation, then continue
to use the comma just that way and don't overload it.  If you want
to use the comma as a shorthand for a function call, then accept the
function-call semantics.

It would be possible to change the rules so that order of evaluation
was preserved for overloaded versions of operators "&&", "||", and ",".
Any proposal to do so would have to show some good reason why the
change is needed.  Personally, I've never seen any example of code
which was improved by using an overloaded comma (which of course
doesn't mean there is no such code).

In the case of "&&" and "||", another solution might be to provide
operator void*() for the classes instead, and not overload the logical
functions.  If that doesn't solve the problem, then it seems to me
that the overloaded logical operators are violating the principle of
acting like their built-in versions.  For example, "A && B" doesn't
do anything to A or B, but treats each as a zero/non-zero value.  You
don't need to overload "&&" to get that effect.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
From: bear@harlqn.co.uk (Andy Edwards)
Newsgroups: comp.lang.c++
Subject: Re: Tiny proposal for named loops.
Date: 12 Sep 92 15:51:31 GMT
	<TSOS.61.714395736@uni-duesseldorf.de>
Organization: Harlequin Limited, Cambridge, England


Hi,

*In article <aldavi01.714376080@starbase.spd.louisville.edu> aldavi01@starbase.spd.louisville.edu (Arlie Davis) writes:
*
*>Since the language ...[double click here to expand text]...
*
*I like your idea. It could certainly make C[++] code safer
*and more legible. There shouldn't be any syntactical problem
*with
*
*     if [<id>] (<expression>) <statement>
*     switch [<id>] (<expression>) <statement>
*     while [<id>] (<expression>) <statement>
*     do <statement> while [<id>] (<expression>) ;
*     for [<id>] (...;...;...) <statement>

I agree, these would be an added boon to coders.

*Talking about blocks: Have there been any discussions about
*a possible assignment of identifications to blocks? Something
*like
*
*     {<block-id>
*        ...
*     <block-id>}

This is taking C++ back to it's roots (ie BCPL!)

Best Regards,
andy

+--: Andy Edwards :----------*=================*------------------------------+
| Macintosh fire fighter,    | Harlequin Ltd.  |      uucp: bear@harlqn.uucp  |
| Deity, PostScript language | Barrington Hall |     janet: bear@uk.co.harlqn |
| level 2 porter and PAP     | Barrington      | applelink: harlequin         |
| server clone originator.   | Cambridge       |     voice: 0223 872522       |
| *They that have power to   | CB2 5RG         |            +44-223-872-522   |
|  hurt, and will do none*   | England         |       fax: 0223 872519       |
+----------------------------*=================*------------------------------+
Newsgroups: comp.lang.c++
From: jwa@vipunen.hut.fi (Jyrki J Wahlstedt)
Subject: Class libraries...?
Organization: Helsinki University of Technology, Finland
Distribution: comp.lang.c++
Date: 9 Sep 92 00:42:34

  I am posting this on behalf of a friend of mine, who doesn't have
  access to Internet (pity).
  Where can you get class libraries and for what purpose are they?
  Does someone keep a list of these libraries, that would really
  be a source of valuable information?
  If you know any, please email me, be they commercial or free,
  with access information (ftp address, Internet address, phone etc.)!

  As I've been browsing this newsgroup, I've seen NIHCL and LEDA mentioned,
  but there is more, I believe!

  Thank you all!
--
!
!	Jyrki Wahlstedt
!		Jyrki.Wahlstedt@hut.fi
!
!  Our life is no dream, but it should and will perhaps become one.
!
Newsgroups: comp.lang.c++
From: louis@obelix.newshost.uwo.ca (Chan Louis)
Subject: Wanted: Interface independent Class Browser program
Organization: /m4/student/1985/louis/.organization
Distribution: comp.lang.c++,comp.sources.wanted
Date: Wed, 16 Sep 1992 01:23:35 GMT

Hi guys,
	I want to have a class browser independent on the interface.  The
class browser can show me the parent and the children of a given class.  It
does not have to have a good interface, better if it runs in emacs.  If 
possible, it can show me the header file of the given class.
	Does someone know any sites has that kind of program ?
	Thanks in advance.

Louis
From: hjbla@usho83.hou281.chevron.com (J.B.Laite)
Newsgroups: comp.lang.c++,chevron.programming
Subject: HOOPLA Meeting
Keywords: OOP,C++
Date: 10 Sep 92 21:51:38 GMT
Organization: Chevron

The Houston Object Oriented Programming Languages Association
   is pleased to Announce the next Bi-Monthly Meeting

Tuesday, September 15, 1992 at 5:00 P.M. at the INNOVA Building

      FEATURE PRESENTATION
           6:00 - 7:00
      John McGhee, Senior Member Technical Staff
         for Texas Instruments will be presenting
      "Lessons Learned"  (All Phases of an OO Project)

      SPECIAL TOPIC PRESENTATION
           7:30 - 8:00
      Erick Rivas, Senior Software Engineer
         for Protosoft will be demonstrating
      "Paradigm Plus" (A POWERFUL OO Case Tool)

   RESERVATIONS: CALL (713) 541-0100
    
   Cash Bar & Appetizers

  
   Meeting Fee:  $7.00 (Members)    $15.00(Non-Members)         

--
    Johanna B. Laite                         Internet:hjbla@hou281.chevron.com
    Out of the CEPS pool and lovin' it.      Voice:    (713) 596-2508
                                             Fax:      (713) 596-3259 
Newsgroups: comp.lang.c++
From: Hannu.Nyman@hut.fi (Hannu Nyman)
Subject: Re: FULL HOUSE
Reply-To: Hannu.Nyman@hut.fi
Organization: Helsinki University of Technology, Finland
Date: 13 Sep 92 23:28:00

In article <1992Sep13.144315.24892@wuecl.wustl.edu>, ppc1@cec1.wustl.edu (Peter Pui Tak Chiu) writes:

> i am trying to find the probability of getting a hand of full house from a
> shuffled deck of 52 cards.
>
> theoretically, the probability (i think) is:
>
>         (13 * 4C2) * (12 * 4C3)
>         -----------------------  =  0.001440576
>                  52C5
>
> but i wrote a c program to calculate this probability and the results turn
> out to be very different.

[DELETED]

> 5480000 0.00420967
> 5490000 0.00420765
> 5500000 0.004208  ... this means after 5500000 trials, the prob. is 0.004208
>
>
> from these results, i conclude that the probability would be pretty much around
> 0.00421 which is very different from the theoretical value.
>
> does anyone know why???

[DELETED]

> void init(){
> for(int i=0;i<5;i++)hand[i]=rand()%13;	// deal the cards
> }

Here is your mistake: You are drawing cards from an infinite deck. The
probability of getting e.g. an ace after your first card was one is no
more 1/13, it is 3/51 and so on... You should declare a proper deck of
52 cards and draw cards from it, marking those cards you already have
got so that you can't have two aces of clubs at the same hand!

Hannu Nyman
--
+--------------------+---------------------------+----------------------+
I    Hannu Nyman     I   Hannu.Nyman@hut.fi      I  Errare humanum est  I
I                    I   hnyman@vipunen.hut.fi   I                      I
+--------------------+---------------------------+----------------------+
From: tmb@arolla.idiap.ch (Thomas M. Breuel)
Newsgroups: comp.lang.c++
Subject: Re: zero-length datatype
Date: 14 Sep 92 18:56:55 GMT
	<23659@alice.att.com> <TMB.92Sep12212903@arolla.idiap.ch>
	<23661@alice.att.com>
Reply-To: tmb@idiap.ch
Distribution: comp
Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
	Perceptive)
In-reply-to: ark@alice.att.com's message of 13 Sep 92 15:19:04 GMT

In article <23661@alice.att.com> ark@alice.att.com (Andrew Koenig) writes:

>In article <TMB.92Sep12212903@arolla.idiap.ch> tmb@idiap.ch writes:

>> Well, it might be good to remain compatible, in the sense that every
>> object that has non-zero size in ISO C also have a non-zero size in
>> C++. However, since there are no objects of type "void" (or of some
>> other, newly introduced, distinguished type with zero size) in ISO C,
>> there can't be any harm in letting objects of this new type have zero
>> size: the behavior of existing code would not be affected.
>
>That is not quite true, especially in the presence of templates.
>
>I expect that there will be some committee members who will say
>that they want to be able to assume that objects of any type at all
>are nonzero in size and admitting a new empty type would violate
>that assumption.  And indeed it might even affect old C code, if that
>code uses a type that is macro-expanded into something not known until
>the code is actually compiled.

I discussed this issue at great depth in a previous posting.

To summarize again:

Yes, it is obviously true that if you hand a "void" as an argument to
a template function (or template macro) that was written with the
assumption that there are no zero-length datatypes, that template
function may not behave as expected. But that's true for any other new
type or type-related construct that C++ adds: handing a new quad
precision datatype to a numerical template function, for example,
might cause non-termination.

Existing code can't legally hand "void" to an existing template
function, hence it will not be affected by the feature. If you write
new code that uses an old template function, then you better make sure
that the types you use work for that template function; that's true
for _any_ kind of type you might use, not just "void".

					Thomas.
Newsgroups: comp.lang.c++
From: J.March@lut.ac.uk
Newsgroups: comp.lang.c++
Subject: How many Novices?
Date: 10 Sep 92 12:01:45 GMT
Reply-To: J.March@lut.ac.uk (Jon March)
Organization: Loughborough University, UK.

How many novicies are there using this group?

If you consider yourself to be a novice, mail an empty message to me
with the subject: C++ novice.
(Don't send any text 'cos I'm not going to read them :-)

I'll let everyone know the count soon,

Jon
From: skochhar@cvbnet.prime.com (Sandeep Kochhar x4618 5-2)
Newsgroups: comp.lang.c++
Subject: Nested Class constructors
Date: 10 Sep 92 17:18:53 GMT
Distribution: usa
Organization: Computervision

hi!
Suppose I have a header file that contains:
    class B { public: B(); };
    class A { class B { public: B(); }
	      public: A(); };

In the implementation file, how to I declare and define the two constructors?
For the global B class, I try
	B::B() {...}
and on my Sun C++ 2.1, I get:
    "nest.c", line 26: error:  B() is not a member of B

For the nested B class, I tried
	A::B::B() {...}
but I got a message saying 
	"nest.c", line 26: sorry, not implemented:  class names do not nest,
	use typedef x::y y_in_x
So, I tried,
	typedef A::B BinA;
	BinA::B() {...};
but I got
	"nest.c", line 27: undefined structure or union


So, again, my question is:
In the implementation file, how to I declare and define the two constructors?


Thanks.

-- 
Sandeep Kochhar
Computervision, MS 5-2            email: skochhar@cvbnet.prime.com
14 Crosby Drive                   tel:   (617) 275-1800 x 4618          
Bedford, MA 01730                 fax:   (617) 275-8506
Newsgroups: comp.lang.c++
From: kanze@us-es.sel.de (James Kanze)
Subject: Re: ENCRYPTION OF DATA FILE ACCESSED BY MY C++ PROGRAM
Organization: SEL-Alcatel LTS Dept. US/ES
Date: Fri, 28 Aug 92 14:16:31 GMT

In article <1992Aug23.165130.15650@eagle.lerc.nasa.gov>, tostan@bert.lerc.nasa.gov (Stan Mohler) writes:
|> 
|> Hello Turbo C++ programmers.  I'm just learning C/C++, teaching myself on my
|> PC with Turbo C++.  I want to write a program that reads a big data file,
|> which I plan to create, and uses the info.  The data file will be very large,
|> and will be contained on the disk with the program. 
|> 
|> But: when I sell this program, I don't want the buyer to be able to access 
|> the accompanying data file's information EXCEPT through MY PROGRAM.  
|> 
|> It will take alot of effort to create this file.
|> I want some way of encrypting it so that my C++ program can read it, decrypt
|> the sentences in there, and display them in plain English.  Any ideas on
|> how to do this?  I though of making up my own "ascii codes", and storing the
|> characters as binary numbers decipherable by my own inveted table.  But I
|> think that might be too easy to decrypt.  Any thoughts?  Thanks.  Note: I
|> would also like to store images in some manner that no other program will be
|> able to recreate the images but mine.  Any thoughts on that, too?
|>  
|> NOTE: OBVIOUSLY it will be possible for SOMEONE to decrypt the file.  Please
|> don't waste my time telling me not the bother!  My objective is the MINIMIZE
|> the ease of decryption, not make it impossible.  

Well, just compressing it will already do more encryption than a simple Ceasar
code (which you suggest).  There are a couple of public domain encryption programs
around; if you use one, of course, you'll want to modify it in some personal fashion.
If not, anyone else with the same program will be able to read your files.

This also has the advantage of reducing the size of the file.  On the other hand,
it doesn't allow random access, but then none of the good encryption schemes I
know of do either.  It can also be a bit slow.

If this doesn't seem sufficient, x-oring the compressed output with (pseudo-)random
sequence of numbers should make things more difficult.  For that matter, since the
input is now apparently rather random, a Ceasar code might be sufficient.

Of course, anyone who really wants to can back-engineer your program to find out how
you do it.  But that is a lot of work, especially if you use a lot of virtual
functions (which make the control flow in the disassembled program particularly
difficult to follow).
--
James Kanze                             GABI Software, Sarl.
email: kanze@us-es.sel.de               8 rue du Faisan
                                        67000 Strasbourg
                                        France
Newsgroups: comp.lang.c++
From: shirleyk@qualix.com (Shirley Kumamoto)
Subject: Re: Class libraries...?
Followup-To: shirleyk@qualix.com
Summary: c++ class libraries
Keywords: C++ library
Reply-To: info@qualix.com
Organization: QUALiX Group, Inc.
Date: Wed, 9 Sep 1992 16:07:05 GMT

In article 92Sep9004234@vipunen.hut.fi, jwa@vipunen.hut.fi (Jyrki J Wahlstedt) writes:
>   I am posting this on behalf of a friend of mine, who doesn't have
>   access to Internet (pity).
>   Where can you get class libraries and for what purpose are they?
>   Does someone keep a list of these libraries, that would really
>   be a source of valuable information?
>   If you know any, please email me, be they commercial or free,
>   with access information (ftp address, Internet address, phone etc.)!
> 
>   As I've been browsing this newsgroup, I've seen NIHCL and LEDA mentioned,
>   but there is more, I believe!
> 
>   Thank you all!
> --
> !
> !	Jyrki Wahlstedt
> !		Jyrki.Wahlstedt@hut.fi
> !
> !  Our life is no dream, but it should and will perhaps become one.
> !


The Qualix Group carries an extensive line of C++ class libraries,
compilers, and other programming products for UNIX workstations.
Enclosed is a brief list of our products.  If you'd like more 
info, email us at:

info@qualix.com
*********************************************************************

              C++ Product Family
              --- ------- ------
              from Qualix Group

View.h++
-------- 
o C++ interface to Motif

Xv++
----
o C++ interface to XView

Tools.h++
---------
o Foundation class library

Math.h++/Matrix.h++
-------------------
o Numerics library for linear algebra, random numbers, and statistics.
  Also contains new matrix types such as Skew, Hermitian, and Symmetric.

Linpack.h++
-----------
o Fortran LINPACK's functionality in an advanced C++ class interface.

db++
----
o Uniform C++ interface to SQL and ISAM databases

M++
---
o C++ math libraries for array manipulation and numerical analysis

C++ Starter Kit
--- ------- ---
o Low priced C++ learning kit for those who want to try C++

Lucid C++
----- ---
o Native compiler for SPARC systems

Solbourne C++
--------- ---
o 3.0 CFront translator for SPARC systems

Solbourne PDB debugger
--------- --- --------
o powerful symbolic debugger

Solbourne OI Libraries
--------- -- ---------
o Object-oriented user interface libraries to build GUI applications which 
  can either be Motif or OPEN LOOK - selectable at runtime

Solbourne UI Builder
--------- -- -------
o Drag and drop GUI builder to build Motif and Open Look applications. 
  The user chooses at runtime.

SPARCworks for C++, C, FORTRAN
------------------------------
o Complete integrated development environment from Sun.

NetMake
-------
o Compile five times faster!  NetMake transparently splits your make
  process up and runs it on the underutilized machines on the network.

Latitude
--------

o Virtual porting tool for making custom Macintosh products run on
  UNIX RISC workstations.


Xref: sparky comp.lang.c++:13704 comp.lang.c:13697 comp.os.os2.apps:6188 comp.os.os2.programmer:4974
From: manne@Minsk.docs.uu.se (Magnus L|vkvist)
Newsgroups: comp.lang.c++,comp.lang.c,comp.os.os2.apps,comp.os.os2.programmer
Subject: Wanted: Animation software
Date: 15 Sep 92 19:26:39 GMT
Organization: Uppsala University
NNTP-Posting-Host: minsk.docs.uu.se
Keywords: animation

I am looking for a C/C++ 2D/3D graphical animation library for OS/2, DOS or
Windows. Any ideas? Please e-mail.

Thanks.

/Magnus
From: pjl@sparc10.cs.uiuc.edu (Paul Lucas)
Newsgroups: comp.lang.c++
Subject: Re: Looking for a good C++ book...
Keywords: help C++ books
Date: 15 Sep 92 03:27:04 GMT
Organization: University of Illinois at Urbana-Champaign

In <1992Sep15.023610.7608@cs.rose-hulman.edu> chasebd@NeXTwork.Rose-Hulman.Edu (Brian D Chase) writes:

>I'd appreciate any info on good books covering the C++ language.  I'd prefer
>something similar to K&R's "The C Programming Language" if there exists
>such a text for C++, but I don't really care too much as long as it's a good  
>book.  Sooooo... any suggestions?  There seems to be a whole lot of books out  
>there on C++, some of them must be good.  I'm using Borland TC++ if that  
>helps any, but for the most part I'm interested in vanilla C++. 

*****>	How about: The C++ Programming Language, 2nd ed.
	Author:	Bjarne Stroustrup
	Pub: Addison-Wesley, 1991
	ISBN: 0-201-53992-6

	Or: C++ Primer, 2nd ed.
	Author: Stanley B. Lippman
	Pub: Addison-Wesley, 1992
	ISBN: 0-201-54848-8
-- 
	- Paul J. Lucas				University of Illinois	
	  AT&T Bell Laboratories		at Urbana-Champaign
	  Naperville, IL			pjl@cs.uiuc.edu
From: s0jrej@exnet.co.uk (James Ellis-Jones)
Newsgroups: comp.lang.c++
Subject: DEC C++ compilers history
Date: 5 Sep 92 12:58:47 GMT
Organization: ExNet Systems Ltd Public Access News, London, UK

I wonder if anyone could help ... I need to know of any C++ compilers that
were available for DEC Ultrix in June 1991 - I know DEC now do their own
C++ compiler, but as far as I can tell it wasn't available then.  Information
as to whether the compiler was really a cross-compiler into C and what
support facilities were provided with it, etc. would be useful.  Strange
request I know...

Thanks,

  James
Newsgroups: comp.lang.c++
From: KOCHER@141.58.123.1 (HARTMUT KOCHER)
Subject: Pointer or Reference Arguments
Organization: University of Stuttgart, IND
Date: Mon, 7 Sep 1992 07:52:49 GMT
X-News-Reader: VMS NEWS 1.20

I am currently trying to find a consistent style in 
using pointer and references as function arguments.
Currently, I am thinking about two different styles that 
I want to explain in the following paragraphs:

1) Reference arguments are used only when aliasing 
occurs and the parameter is used only during the 
lifetime of the function. Pointers are used whenever the 
function might keep a copy of the pointer for later use, 
e.g., store it in a private list.

2) Reference arguments are used whenever you must supply 
a valid object to the function. Pointers are used when 0 
might be a valid parameter as well.

The first approach gives the user of a function a hint 
whether a private copy of an object may be retained by a 
function. The second approach makes implementation 
easier because you dont have to check for 0-pointers so 
often. The user also sees if he must supply an object or 
if 0 is allowed as a valid parameter. I think both 
versions have something going for them and I am 
interested in hearing from you which one you think is 
best. (Or if you have yet another solution to this.)
Any opinions?

Hartmut Kocher
Kocher@nvdv.e-technik.uni-stuttgart.dbp.de
From: J.March@lut.ac.uk
Newsgroups: comp.lang.c++
Subject: Arguement passing, variables and constructors
Date: 10 Sep 92 17:46:06 GMT
Reply-To: J.March@lut.ac.uk (Jon March)
Organization: Loughborough University, UK.

I want to implement some container libraries.  They must be efficient but I'm
unsure about the way in which constructors, copy-constructors, assignment and
other arguement passing issues effect execution speed.  I would appreciate a
blow by blow answer.  I do realise that inlineing would should also be used in
optimisation but I didn't want to clutter this question...


What happens to the arguements and variables during the execution of the 
examples below?

Which is most efficient (a hybrid could be suggested)?

Any other comments...


Please reply to this in the group (but first check to see if anyone else has 
beaten you to it :-( ) as I think that a few others would like to know the 
answer to this,

Jon



/*--------------------------- cut here -------------------------------------*/
// eg 1


class A
{
	int i;
public:
	A() : i(0) {}
};


class T
{
	A*	p;
	T*	next;
public:
		T() : p(0), next(0) {}
		T(const A);
		T(const A, const T);
	T	f(const A) const;
};


T::T(const A q)
{
	p = new A(q);
	next = new T;
}


T::T(const A q, const T t)
{
	p = new A(q);
	next = new T(t);
}


T T::f(const A q) const
{
	return T(q, *this);
}


void main()
{
	T t1;
	A a1;

	T t2 = t1.f(a1);
}




/*--------------------------- cut here -------------------------------------*/
// eg 2


class A
{
	int i;
public:
	A() : i(0) {}
};


class T
{
	A*	p;
	T*	next;
public:
		T() : p(0), next(0) {}
		T(const A&);
		T(const A&, const T&);
	T	f(const A&) const;
};


T::T(const A& q)
{
	p = new A(q);
	next = new T;
}


T::T(const A& q, const T& t)
{
	p = new A(q);
	next = new T(t);
}


T T::f(const A& q) const
{
	return T(q, *this);
}


void main()
{
	T t1;
	A a1;

	T t2 = t1.f(a1);
}




/*--------------------------- cut here -------------------------------------*/
// eg 3 


class A
{
	int i;
public:
	A() : i(0) {}
};


class T
{
	A*	p;
	T*	next;
public:
		T() : p(0), next(0) {}
		T(A*);			// compiler:
		T(A*, T*);		// no standard conversion of  
friend	T*	f(A*, T*); 		//  	const T * to  T *
};

T::T(A* q)				// I could have inlined this in the
{					// declaration but I didn't to keep
	p = q;				// the examples consistant.
	next = new T;
}


T::T(A* q, T* t)			// ditto
{
	p = q;
	next = t;
}


T* f(A* q, T* t)
{
	return new T(q, t);
}


void main()
{
	T* t1 = new T;
	A* a1 = new A;

	T* t2 = f(a1, t1);
}
Newsgroups: comp.lang.c++