HDTenEightyP/NetNews huggingface dataset:
From: edwin@maui.cs.ucla.edu (Edwin Tisdale)
Subject: C++ for IBM 3090 and ES/9000 computers
Originator: edwin@maui.cs.ucla.edu
Keywords: IBM ES/9000 Model 900 Supercomputer
Organization: UCLA Computer Science Department
Date: Thu, 9 Apr 92 20:56:13 GMT

We would like to install C++ on our IBM ES/9000 Model 900 Supercomputer.
Is there a version of C++ that will run on IBM 3090 or ES/9000 computers?
Has anyone tried to port a C++ compiler to these machines?
Would anyone know how to go about porting a C++ compiler to these machines?
Any help in answering these questions would be appreciated.
Thanks in advance, Bob Tisdale (edwin.cs.ucla.edu)
From: marc@dumbcat.sf.ca.us (Marco S Hyman)
Newsgroups: comp.lang.c++
Subject: Re: Looking for version of 'indent' utility for C++
Date: 7 Apr 92 05:33:37 GMT
Article-I.D.: dumbcat.1992Apr7.053337.7438
Organization: MSH Software, Hayward, CA

In article <9204021440.AA07393@vonneumann.ny.jpmorgan.com> chan@vonneumann.UUCP (Milo A. Chan) writes:
 > I am looking for a version of the unix 'indent' utility which supports the
 > extended syntax of C++, like //-style comments, "::" scope qualifier, etc.

You may already have it.  There was a version posted to the net a while back
that has support for the -+ flag.  Files ending in .C in this version are also
assumed to be C++ files.  If you dont have it you can get a copy of via
anonymous UUCP from dumbcat -- check the maps (u.usa.ca.?) for login info.
File is ~src/indent.tar.Z.  This version has been fixed to properly handle
the 14 character filename limit on System V UNIX.

I'm willing to shar and mail this to anyone who will make it available via
anonymous FTP.  Any takers?

// marc
-- 
marc@dumbcat.sf.ca.us -- pacbell!dumbcat!marc
From: mullens@jamsun.ic.ornl.gov (James A. Mullens)
Newsgroups: comp.lang.c++
Subject: Re: Help with BC++ 3.0
Date: 8 Apr 92 22:12:06 GMT
Organization: Oak Ridge National Laboratory

In article <EBARTON.92Apr8125137@world.std.com>, ebarton@world.std.com (Edward Barton) writes:
|> As I have begun attempting to use C++ classes in nontrivial ways, I I
|> have encountered what appear to be various bugs in Borland C++ 3.0.
|> The major bugs that I describe here are:
|> 
|> 	- destructors called out of order, sometimes before
|> 	  constructors, when returning classes by value from
|> 	  a function
|>
|> 	- GP FAULT in the compiler when certain template classes
|> 	  are used
|> 

I had a very short test program which produced "register allocation failure"
during a BCC 2.0 compile and a GP FAULT during compile with BCC 3.0.  It
involved passing an object by value.  Through various experiences, I have
learned to avoid passing objects by value to or from a function.  Usually it 
works but sometimes, for reasons that are hidden deap in the bowels of the
compiler or the language specification, it causes a bug that is incredibly
hard to find and never resolved.

I ran your test code #1 with Sun C++ 2.1 and it seemed to work (I'm emailing
the results to you).  Going out on a limb, I'll suggest you change your
plus member functions from:

  Value Value::plus(int y)
  {
    Value t(y);
    t.x += x;
    return t;
  }

(which seems to me to be begging to uncover a compiler bug) to:

  Value Value::plus(int y)
  {
    return Value(x+y);
  }

which is more efficient and doesn't ask the compiler to pass a copy of
an object that will be destructed when the return executes.  (I hope
that's possible in your real application).  This also seems to work on
the Sun compiler.

Maybe a combination of compiler inlining and optimizing are responsible.
The Sun compiler refuses to make your constructor inline (too complex) so
I'm not sure what the expansion of your inline plus() members (which invoke
that constructor) might be...

jim mullens
mullens@jamsun.ic.ornl.gov (128.219.64.31)
voice: 615-574-5564
Newsgroups: comp.lang.c++
From: mpa@zoo.bt.co.uk (Paul Andrews)
Newsgroups: comp.lang.c++
Subject: Re: BC++ 3.0 Problem (please help)
Date: 6 Apr 92 08:04:54 GMT
Reply-To: mpa@zoo.bt.co.uk
Organization: BT Laboratories

Thanks for your various replies. There were in fact 2 problems:

1. My dialog used borland controls. To use these you need to use TB<control> classes
   rather than T<control> classes in the actual program.

   More than this, however, you need to link with smart pointers and use a Borland
   .DLL for the user-interface elements. Thus, when I ran the program from within
   the IDE it worked (I guess because the .DLL was around). When I ran it outside
   of the IDE it didn't work (Error -5).

   Oh well... I redefined the dialog to not use Borland controls.

   Its all there in the documentation if you search around the disk. No mention
   in the printed matter.

2. The 'Pure virtual function called' message is a different error that I am still
   working on but it happens under well defined conditions so it shouldn't be a
   problem.

Thanks - Paul
Newsgroups: comp.lang.c++
From: schwartz@possum.den.mmc.com (Michael I Schwartz)
Subject: Question on correct template declaration
Organization: Martin Marietta Astronautics, Denver
Distribution: na
Date: Wed, 15 Apr 1992 05:13:38 GMT

Enclosed is a short question I have not been able to find an authoritative 
answer on from the reference.  G++ 2.1 and Borland C++ behave differently.

Given:
template <class T> class X
{
  ...
    void a (X*);
  ...
};

should the function be defined as:

template <class T> void X<T>::a(X* x)    // G++ 2.1 is OK; Borland wrong
  or
template <class T> void X<T>::a(X<T>* x) // G++ 2.1 wrong; Borland OK

if the function "a" is "X", the first way is right (p. 350, Annotated C++);
if the function were a friend instead of a member, the second way is right
(more or less, that is; ibid., p. 351)

If both interpretations are possible, the second seems more user-expected....

Thoughts anyone?
-- 
schwartz@pogo.den.mmc.com              "You'll find ... that the only thing 
mschwartz@mmc.com                          you can do easily is be wrong, 
DISCLAIMER:  The opinions expressed are      and that's hardly worth the effort"
not necessarily those of my employer or myself.          --the phantom tollbooth
Newsgroups: comp.lang.c++
From: olender@rodrigo.cs.colostate.edu (Kurt Olender)
Newsgroups: comp.lang.c++
Subject: Diskette of code from Booch's OOD book: (Was Best C++ Books)
Date: 9 Apr 92 20:52:57 GMT
	<SCOTT.92Apr8100530@swindle.Berkeley.EDU> <22522@alice.att.com>
Organization: Colorado State Univ. Computer Science Dept.


Bjarne Stroustrup writes:

   The book has 5 extended examples of about 40 pages each. they include
   skeleton code and design discussion, not executable code - the examples are
   too large for that. I consider it a nice point about the book that the
   examples are in 5 different languages: Smalltalk, Object Pascal, C++, CLOS,
   and Ada.

It may not be generally known, but Benjamin/Cummings also distributes a
Macintosh diskette with the source code of the examples.  The Smalltalk, C++,
Ada, and CLOS appear to be pretty much extensions of the code skeletons in
the book, but the ObjectPascal case study code looks quite complete.

I don't know if this diskette is available to the general public or only to
instructors using the book as an OOD text.  The ISBN is 0-201-91570-7.
Newsgroups: comp.lang.c++
From: walsha@iccgcc.decnet.ab.com (for now winter has gone, the rains have departed and the voice of the dove is heard again in our land.)
Newsgroups: comp.lang.c++
Subject: ... stream question...
Date: 17 Apr 92 16:54:04 EST


if one is inputting from a keyboard using 

	int answer;

       	cin >> answer;

and the user presses a letter instead of a number, Stream is hosed 
and no longer usable until an ios error bit is cleared.  

In the humble opinions of netusers, what's a good way to handle exceptions
like this? Is this even a good way to go about things,
or should one make "answer" a char and then convert it to int after it
is input by user, so that the stream stuff is more stable? 

   ando.
From: Jean_Laviolette@softworx.access (Jean Laviolette)
Newsgroups: comp.lang.c++
Subject: Re: redirecting output
Distribution: world
Date: 9 Apr 92 02:05:40 PST
Organization: Subterrainian Softworx BBS

In a message dated Tue  7 Apr 92 05:15, Kmart@athena.mit.edu (jim Martin)
wrote:

 KM> I have loaded a device driver in DOS to handle a second monitor.
 KM> To send output to the second monitor from the DOS prompt, I type:

 dir > MONO

 KM> (to send the output from dir to the second monitor.)

 KM> How can I redirect the output in my C++ programs to go to this
 KM> second monitor?  (I think I'm supposed to define a stream, but I
 KM> don't
 KM> know how.)

 KM> Help!

"MONO" is simply regarded as a special file.  Just open it like any other
text file and write to it.  Nothing more, nothing less.

 KM> Thanks.

You're quite welcome!

 KM> Jim
Jean

-- Via DLG Pro v0.991
From: sakkinen@jyu.fi (Markku Sakkinen)
Newsgroups: comp.lang.c++
Subject: Re: C++ Meta-Programming ?
Keywords: metaprogramming, research
Date: 7 Apr 92 07:39:32 GMT
Organization: University of Jyvaskyla, Finland

In article <1992Mar30.140319.14966@daimi.aau.dk> ludvig@daimi.aau.dk (Peter Huebel) writes:
>Doing some work on language independent OODB's, we're interrested
>in work done on meta-programming in C++, i.e. manipulation/extension
>of classes at runtime.
>
>Any help/pointers/references would be appreciated.

Among the more or less OO languages that come to my mind,
C++ is probably the one that has the least amount of run-time
meta information (by design).
Unless you are prepared to build your own implementation
of an extended C++ (you could obviously use g++ as the base),
the project looks rather hopeless.

----------------------------------------------------------------------
Don't smell rotten -- avoid a "look and smell" litigation from
Apple Computer.

Markku Sakkinen (sakkinen@jytko.jyu.fi)
       SAKKINEN@FINJYU.bitnet (alternative network address)
Department of Computer Science and Information Systems
University of Jyvaskyla (a's with umlauts)
PL 35
SF-40351 Jyvaskyla (umlauts again)
Finland
----------------------------------------------------------------------
From: jacques@mksinfo.uucp (Jacques Gelinas)
Newsgroups: comp.lang.c++
Subject: Overload function selection (bug in BC30 ?)
Date: 15 Apr 92 03:47:31 GMT
Article-I.D.: mksinfo.1992Apr15.034731.11089
Organization: mks compu group


I have discover a bug in BC 3.0. From my understanding of the
ARM it is a bug. Enough to make the compiler unusable for me. The
compiler improperly selects the wrong overload function. The following
example has been compiled with BC 2.0, SUN C++ 2.0 and BC 3.0. The
two first compiler produced the same result.

Any workaround ?


/*
	This program demonstrate a bug in selection of overload function
	with Borland C++ 3.0.

	Compile with BC 2.0 or SUN C++ 2.0, it produces accuratly:

	nom = A suppose = A
	nom = B suppose = B
	nom = C suppose = C
	nom = D suppose = C
	nom = E suppose = C

	Compiled with BC 3.0, it produces this:

	nom = A suppose = A
	nom = B suppose = B
	nom = C suppose = C
	nom = D suppose = B		<- Wrong
	nom = E suppose = B		<- Wrong
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

class A{
public:
	char nom[2];
	A(){ strcpy(nom,"A"); }
	void print (const char *suppose) {
		printf ("nom = %s suppose = %s\n",nom,suppose);
	}
};

class B: public A{
public:
	B(){ strcpy(nom,"B"); }
};

class C: public B{
public:
	C(){ strcpy(nom,"C"); }
};

class D: public C{
public:
	D(){ strcpy(nom,"D"); }
};
class E: public D{
public:
	E(){ strcpy(nom,"E"); }
};

void f(A* pt)
{
	pt->print("A");
}
void f(B* pt)
{
	pt->print("B");
}
void f(C* pt)
{
	pt->print("C");
}

int main (int, char *[])
{
	A a;
	B b;
	C c;
	D d;
	E e;
	f(&a);
	f(&b);
	f(&c);
	f(&d);
	f(&e);
	return 0;
}

Thanks!


-- 
----------
Jacques Gelinas  jacques@mksinfo.uucp jacques@solucor.uucp
Newsgroups: comp.lang.c++
From: rteasdal@polyslo.csc.calpoly.edu (Rusty)
Subject: Runtime Validation?
Date: Fri, 10 Apr 92 20:49:12 GMT
Organization: Cal Poly State Univ,CSC Dept,San Luis Obispo,CA 93407
Summary: What should be checked? 
Keywords: runtime validation verification 


	All right, here's a question from a novice in the language for
all you wizards out there. Replies by either email or article are fine
with me; use your own discretion.

	I've been wondering about what can be done in the way of various
forms of run-time validation in C++. My thinking on the matter was catalyzed
by the example set by one of our professors here at Poly, who wrote a
deceptively simple little library module in C to keep track of pointer
use and misuse. Compiling with this file results in malloc being #defined
to a function called "smartalloc". This then keeps an eye on pointers and
permits the programmer to determine if pointers are left dangling, if there
is a write past the end of malloc'ed memory, or a reuse of that memory
after it's been freed, and so forth. In short, it spots the usual suspects 
of pointer manipulation. Smartalloc has been used on a lot of supposedly
robust and well-tested C code and it has turned up numerous pointer bugs
in virtually every program, even in the very well-behaved ones.

	It's a very useful little tool, and what I've been thinking is
that it would be nice to have something comparable written as a C++ class,
presumably one that would replace the basic Object class from which all
other classes are derived in most people's hierarchies. Of course, C++ is
every bit as prone to bad pointer handling as C is, and presumably the 
smartalloc scheme or something like it could be incorporated. But it 
would be nice to have more, hence the question:

	What things, checkable at run-time with some easily removed
compile-time fudging (like the #define replacement of malloc by a brainier
version) would you like to see checked by a validatable-object class in
C++? There are, of course, a whole raft of potential areas but I'd like
to see what the net community regards as being the ones with the greatest    
potential for error (and hence for improvement by inclusion of such a class).

	A short, pithy list would serve my purposes admirably (although I'm
always willing to listen to more detailed explications). Thanks in advance 
for your feedback!  



-- 
||||||||   Russ Teasdale -- rteasdal@polyslo.CalPoly.EDU  --  (Rusty)  ||||||||
-------------------------------------------------------------------------------
"Gentlemen, if we do not succeed, then we run the risk of failure." - D. Quayle
From: reid@ss6.cps.msu.edu (Dr Richard J. Reid)
Newsgroups: comp.lang.c++
Subject: Re: C++ as a 1st programming language ?
Date: 15 Apr 92 12:04:14 GMT
Organization: Department of Computer Science, Michigan State University

In article <1992Apr14.202824.14288@colorado.edu> wilde@tigger.Colorado.EDU (Nick Wilde) writes:
>
>Greetings - How would you rate C++ as a language to 
>*teach* programming in, from the beginning ?
>
>Also, can anyone recommend an "Intro to C++" book which does
>*not* assume a background in another programming language ?
>For instance, would the Booch book, that gets such glowing
>reviews in this forum, suffice ?
>

We use the Russel Winder, "Developing C++ Software", Wiley, text
in our C++ version of CS1.  This is a satisfactory first text
despite the sound of the title.  If a better one comes along,
I believe its hallmark will be the very early use of objects.

We, Oregon State and the University of Virginia
(and probably others) start CS1 students in C++.  It's been
an option here for the past two years, but this fall all
students will start in C++, Pascal will no longer be offered here.

Regards,

R

There are about
From: ralfi@pemcom.pem-stuttgart.de (Ralf U. Holighaus)
Newsgroups: comp.lang.c++
Subject: SCO C++ AT&T Release kompatible
Keywords: SCO C++
Date: 6 Apr 92 13:48:17 GMT
Organization: PEM GmbH, Stuttgart


Does anybody know to what AT&T C++ Release the SCO C++ is kompatible to?

Any help appreciated

Regards
Ralf.

-- 
| Ralf U. Holighaus          |                                     PEM GmbH |
| Technical Support Manager  |          Vaihinger Strasse 49, PO-Box 810165 |
|                            |                 W-7000 Stuttgart 80, Germany |
| holighaus@pem-stuttgart.de |    VOICE: x49-711-713045 FAX: x49-711-713047 |
Organization: Youngstown State University
Date: Friday, 10 Apr 1992 12:29:26 EDT
From: <AMOUTR01@ysub.ysu.edu>
Newsgroups: comp.lang.c++
Subject: int86x

I has anyone experienced problems issuing int86x() in c++ while issuing from
c causes no problems.  I can compile a netbios application using the c part of
turbo C++, but when I attempt to use the c++ part of the compiler the int86x()
function acts totally strange.  Perhaps this is a msdos.programmer post,
but I figured I'd post it here as the problem occurs when I try to use the
C++ portion of the compiler...the code runs fine when compiled as C code, but
returns inappropiate codes when C++ code is generated.

Any help would be appreciated.

Thanks,
Mark Adams

amoutr01@ysub.ysu.edu
sradams@ysumax.macs.ysu.edu
Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (Tim Lister)
Subject: Re: Borland's design decisions
Organization: Uni Computing Service, Uni of Sydney, Australia
Date: Tue, 14 Apr 1992 19:25:09 GMT

In article <1992Apr8.003300.20919@borland.com> pete@borland.com (Pete Becker) writes:
>In article <1992Apr2.131624.245@pictel.com> boba@pictel.com (Bob Alexander) writes:
>>Secondly, Borland extended C++ with dynamic dispatch virtual tables.  Why?
>>Why not just just create virtual member functions like WMLButtonDown that
>>always receive a particular message and that the user can override?  What
>>do DDVTs add that is so worthwhile as to justify a non-standard extension
>>to C++?
>>
>
>	You could create a base class that responded to every possible Windows
>message, but you'd have to provide 64K identical functions, each calling
>DefWindowProc().  Then your derived class could override the ones that were
>appropriate.  Now you've got two rather large vtables...
>	-- Pete
>
Pete, IMHO your explanation is inadequate. I have a window management 
mechanism that handles messages and doesn't use DDVTs or 64K.
The method:
 1) define a basic class with say messages 1-10 decoded by a switch
    and calling 10 virtual functions. All other messages go to
    MyDefWinProc, which is virtual. All these virtuals call DefWindowProc().
 2) Just use it. Now wait, you want to use message 11?
    OK, two methods:
    a) Override MyDefWinProc to filter out message 11, else call 
       immediate base class version of MyDefWinProc.
    b) Same as above, but instead of doing it on the fly, package it
       away for reuse.

In effect, this does the same as a DDVT, but the code is written in C++
not 8086 assembler. It is not as fast, requires more user support,
won't work with existing windows etc, but it doesn't require
any non-standard language, and it doesn't require 64K.

I ask for opinions on Borlands language extension.
Pete, perhaps you might post a proper explanation of the syntax and its
purpose for those not using BC.
Please email me, I'll summarise in a few weeks.

 John Skaller, Maxtal P/L.
From: plambert@sml.cs.psu.edu (Paul  Lambert)
Newsgroups: comp.lang.c++
Subject: HELP with abstract base classes
Date: 15 Apr 92 03:31:23 GMT
Organization: Penn State Computer Science

I'm having a horrible problem with a project I need to finish soon; i.e.
tomorrow.  It is a change to an existing program, but it just won't work!

I have three class definitions involved here:

the original read (in shortened form) :

---
class Object {
	public:
	Object& operator=(const Object&);
	int operator==(const Object&);
};

class studentRecord : public Object {
	public:
	virtual studentRecord& operator=(const studentRecord & stdrcd) {
		/*...*/
	}

	virtual int operator==(const studentRecord & stdrcd) {
		/*...*/
	}
};

---
This form compiled fine and ran as a part of a complete, working program.

Now, I need to change it to:
---
class Object {
        public:
        Object& operator=(const Object&);
        int operator==(const Object&);
};

class SortableObject : public Object {
	public:
	int operator>(const SortableObject&);
	int operator<(const SortableObject&);
};

class studentRecord : public SortableObject {
	public:
	virtual studentRecord& operator=(const studentRecord & stdrcd) {
		/*...*/
	}
	virtual int operator==(const studentRecord & stdrcd) {
		/*...*/
	}
	virtual int operator<(const studentRecord & stdrcd) {
		/*...*/
	}
	virtual int operator>(const studentRecord & stdrcd) {
		/*...*/
	}
};
---

and it won't compile!  It tells me "undefined symbol ref'd from text seg"
which means it doesn't recognize them as abstract.

So I change them both to

	virtual /*...*/ =0;

and it says:
hw7.c: In function int main ():
hw7.c:443: cannot allocate an object of type `studentRecord'
hw7.c:443: since the following virtual functions are abstract:
hw7.c:28: int SortableObject::operator < (const class SortableObject &)
hw7.c:29: int SortableObject::operator > (const class SortableObject &)
hw7.c:445: cannot allocate an object of type `studentRecord'
hw7.c:445: since type `studentRecord' has abstract virtual functions
hw7.c:475: cannot allocate an object of type `studentRecord'
hw7.c:475: since type `studentRecord' has abstract virtual functions
hw7.c:484: cannot allocate an object of type `studentRecord'
hw7.c:484: since type `studentRecord' has abstract virtual functions

I have permission from my instructor to ask about this, so I'm not trying
to cheat.  I want to know what I'm doing wrong!

PLEASE reply e-mail to me tonite (Tuesday) if you can--this is due tomorrow and
I've been fuming over this for two days!

--Paul

--
-------------------------------------------------------------------------------
plambert@psuvm.psu.edu, plambert@endor.cs.psu.edu, or just plambert@cs.psu.edu
Newsgroups: comp.lang.c++
From: ilan@seas.gwu.edu (Ilan Berkner)
Subject: C++ (timesharing)
Organization: George Washington University
Date: Mon, 13 Apr 1992 19:03:02 GMT

Hi everyone,

	For the past month I have been trying to develop some sort of a
timesharing system on TURBO C++ using assembly routines, interrupts and what
not.  I'm basically looking for some sort of C or C++ or Pascal code whiche
simulates a mini multiprocessing - timesharing environment on a PC.

This code has to be able to handle anywhere between 2 to 7 processes.  If
anyone has any clue as to how to go about and develop such a system or has
access to such code, could they please let me know where to get it? or send
a response to:

	ilan@sparko.gwu.edu

				Thanks, Ilan
From: strider@concour.cs.concordia.ca (GEORGAKAKIS peter)
Newsgroups: comp.lang.c++
Subject: Re: Borland's design decisions
Date: 14 Apr 92 12:43:39 GMT
Organization: Concordia University, Montreal, Quebec

In article <1992Apr13.172041.134@borland.com> pete@borland.com (Pete Becker) writes:
>In article <3340@daily-planet.concordia.ca> strider@concour.cs.concordia.ca (GEORGAKAKIS peter) writes:
>
>	Suppose you have an unordered collection of objects with an open
>iterator on that collection.  If you insert a new object into that collection,
>what is the correct behavior of that iterator with respect to that object?
>i.e., will the iterator give you back that object before reaching the end
>of the collection or not?  Can you specify the behavior of that iterator in an
>implementation-independent manner without imposing excessive overhead on the
>container and the iterator?
>	-- Pete

Unordered collections do not iterate very well.  The minimum behaviour of an
iterator should be that it can traverse a collection from beginning to end 
passing every element of the collection on the way only once.  No
insertions/removals are done.  With unordered collections the path
taken for this traversal cannot be guaranteed.  When an
insertion/removal is performed on an unordered collection the
iterators iterating that collection can not have a specified behaviour
since the collection itself does not have a specific ordering
property.  

Iterators are tricky and I doubt there is a "perfect" solution.  

Peter