HDTenEightyP/NetNews huggingface dataset:
From: champ@ztivax.UUCP (Manfred Vorwalter)
Newsgroups: comp.lang.c++
Subject: Distributed C++ System
Date: 9 Oct 92 07:24:33 GMT
Reply-To: champ@ztivax.UUCP (Manfred Vorwalter)
Organization: Siemens AG in Munich, W-Germany

We are going to implement a distributed system under C++ and UNIX. We are 
looking for standard components (libraries, etc.) that can help us to keep 
distribution and/or communication in an object oriented manner. 

We are not expierenced in this issues but we think solutions can be in the
different areas:

	* An implementation of threads / lightweight processes with 
	  an object oriented C++ interface. That helps distributing
	  parallel activities on one computer because you can 
	  directly access objects that belong to parallel threads.

	* An object oriented communication that can extract and send
	  the attributes and rebuild the object on the receiver side.

	* A client server architecture where remote objects can be
	  accessed via a local argent.

	* A combination of the last two items that maps remote object
	  spaces into your local process.

We welcome every reply. Hints for books or articals, too.
From: jlg@naucse.cse.nau.edu (James Gibson)
Newsgroups: comp.lang.c++
Subject: Borland C++ w/ Apps Purchase
Keywords: Borland
Date: 10 Oct 92 19:38:15 GMT
Distribution: usa
Organization: Northern Arizona University, Flagstaff AZ

I'm starting a software venture and will be doing some
applications programming for clients.  I will be developing
in C++ and need to purchase a new compiler for my 486 PC.

My question is: is the Borland C++ w/ Applications etc.
is worth the rather substantial cost?  Any mail, comments,
comparisons to Microsoft C++, etc. would be appreciated.
Windows interfacing is a must for the compiler I buy.

Thanks.  Address e-mail to 

         jlg@naucse.cse.nau.edu
From: HeroSoftware@cup.portal.com (Bits of Magic)
Newsgroups: comp.lang.c++
Subject: Constructor Question
Date: Thu,  8 Oct 92 23:41:15 PDT
Organization: The Portal System (TM)

I have a question about constructors:

How should a constructor (or client code) deal with a class requiring
memory allocation?  The constructor cannot return a value indicating
success or failure of memory allocation, so how can the client be
sure that such a class has in fact been correctly initialized?

I can think of only one way:
	If there is an allocated block of memory, there should be
a pointer in the class.  Any client code could check that pointer
for validity immediately upon declaring or allocating an instance.
But that means you can't just rely upon the constructor to properly
create and initialize the instance.

What have I missed?
****************************************************************************
* Evan Robinson                * "I never get sick of zombies.  I just get *
* herosoftware@cup.portal.com  *   sick of producers."                     *
* GEnie: EVANROB               *                        George Romero      *
****************************************************************************
From: es@peanuts.informatik.uni-tuebingen.de (Endric Schubert)
Newsgroups: comp.lang.c++
Subject: Bug in G++?
Date: 12 Oct 92 17:05:24 GMT
Organization: "Lehrstuhl fuer Technische Informatik, Uni Tuebingen"

this is a short example program of Bjarne Stroustrup (b.s.) 
(the C++ programming language, 2nd ed., chapter 5.4.3 "nested classes"):

-------------------------------CUT HERE----------------------------
class X {
  struct private_struct { double m; } ;
public:
  struct public_struct { int m; } ;

  private_struct f(public_struct);
};

void global_func()
{
  // b.s.    says this will be wrong
  // g++     says this is ok
  // CC      says: error: `;' missing after statement
  //             : error:  qualified name X :: private_struct not found in  X
  X::private_struct c;

  // b.s.    says this will be ok
  // g++     also says ok
  // CC      says: error: `;' missing after statement
  //             : error:  qualified name X :: public_struct not found in  X
  X::public_struct d;
}

// b.s.      says this is wrong
// g++       prints a "parse error before '('"
// CC        says ok
private_struct X::f(public_struct a) 
{}

main()
{}

-----------------------------CUT HERE---------------------------

what shall i think about the C++ compilers? have i done some mistakes?

AAARRRRRRGGGGGGHHHHHHHHHH!

-- 

                     Endric Schubert
                  Universitaet Tuebingen
           Lehrstuhl fuer Technische Informatik
                        Sand 13
                 7400 Tuebingen, Germany
From: matt@centerline.com (Matt Landau)
Newsgroups: comp.lang.c++
Subject: Re: Standard for Class Information?
Date: 15 Oct 92 16:10:41 GMT
Organization: CenterLine Software, Inc.
NNTP-Posting-Host: 140.239.1.32

In <1bk34tINNbpd@early-bird.think.com> barmar@think.com (Barry Margolin) writes:
>>Does anyone know of any proposals in this vein?

>I believe Lucid is trying to get the industry to adopt a standard for the
>representation of class information in the debug information of object
>files.  

I believe there might also be something in the proposed DWARF format for 
debugging information that addresses class information for object oriented 
languages.  

Since DWARF is supposed to become the SVR4 standard format for debug info 
in ELF object files, I suspect it's more likely to catch on as an industry 
standard than any proprietary format (Lucid's, ours, or anyone else's).

Does the OSF ROSE format contain any hooks for representing this kind of i
information?
Newsgroups: comp.lang.c++
From: ken@syd.dit.CSIRO.AU (Ken Yap)
Subject: Re: Question: Can I embed SQL in C++
Organization: CSIRO Division of Info Tech, Sydney, Australia
Date: Tue, 13 Oct 92 05:06:45 GMT

There's one thing you should be careful with and that is the C++
comment syntax.  In particular don't do this:

	C++ code
//***********************************
//***********************************
	more C++ code

The SQL preprocessor thinks this is the start of a C comment and loses
a lot of code.

We bumped into this a while back.
Newsgroups: comp.lang.c++
From: arthum@marcus.its.rpi.edu (Michael Rene Arthur)
Subject: Desperately Seeking an FAQ
Reply-To: arthum@rpi.edu
Organization: Rensselaer Polytechnic Institute, Troy, NY.
Date: Mon, 12 Oct 1992 20:15:25 GMT

Is there an FAQ for this newsgroup, and if so, how often is it posted?
From: karl@ncrspks.SparksNV.NCR.COM (Karl Held)
Newsgroups: comp.lang.c++
Subject: re: Borland 3.1 nested comments
Date: 9 Oct 92 15:09:45 GMT
Reply-To: karl@ncrspks.SparksNV.NCR.COM (Karl Held)
Distribution: world
Organization: NCR Corporation, FESC 778 Sparks

>
>My apologies if this topic has already been covered. Highlighting of nested
>comments under Borland C 3.1 does not extend beyond the innermost comment.
>Everything between the initial comment and the end of the most nested comment
>is properly highlighted. The rest of the comments beyond the innermost comment
>is not highlighted. Is anyone aware of a patch to fix this problem? Please
>respond by email, if possible. Thanks in advance.
>
Thanks to all of you who responded to my "problem" of not being able to nest
comments with Borland C 3.1. Everyone who responded said to not use them at 
all, since apparently most compilers do not allow them. Some of the responses 
suggested using the #if 0...#endif construct to simply skip any amount of code 
for testing purposes, which is what my intention was all along. Thanks again.
From: pluto@cs.ucsd.edu (Mark Plutowksi)
Newsgroups: comp.lang.c++
Subject: Re: Does Borland C++ 3.1 have good online help?
Date: 15 Oct 92 18:35:10 GMT

joec@cybernet.cse.fau.edu (joseph cossette) writes:

>I think it's Ok. You get a DOS version of THELP which is a TSR with
>a pretty good help database. The Window IDE also has a pretty good online
>reference. I believe the DOS IDE also has online help (I've never used 
>the DOS IDE).


Regarding the Windows version, I'll go one better.. 
once you're familiar with the development environment,
you won't need the manuals, or if so, rarely.  
One exception is the OWL stuff - the hierarchical organization in
the manuals is not duplicated on line, and is a great time saver
when traversing class inheritance. For instance, finding out quickly
what functions are available for TEdit, given that it is a descendant
of several ancestors.  The Windows IDE is online, I was able to 
return $100 worth of paperback to the bookstore once I discovered
the online SDK.    I am able to continue coding even though my
manuals are packed away for an upcoming office move.  Pretty slick, Borland!
I'm hooked.


= Mark
Newsgroups: bnr.lang.c++,comp.lang.c++
From: senior@bcrki69.bnr.ca (Dan Senior)
Subject: Re: Is pointer in my address space?
Reply-To: senior@bcrki69.bnr.ca (Dan Senior)
Organization: Bell-Northern Research, Ottawa, Canada
Date: Fri, 9 Oct 1992 19:08:38 GMT

In article <ANDRZEJ.92Oct9135447@bcars268.bnr.ca>, andrzej@bnr.ca
(Andrzej Bieszczad) writes:
> In article <1992Oct9.160154.2427@bnr.ca> crlstu4@bnr.ca (Goetz von
Escher) writes:
> 
>    Hi there!
> 
>    Is there a way to find out if a pointer is a valid pointer in C/C++?
>    Or in other words: If I want to read a value in memory, how do I
>    know wether I can read the value at this address without causing
>    an exception (bus error, segmentation fault and that stuff)?
> 
>    Anything?
>    Goetz
> 
> Perhaps you can intercept the signals?
> 
> However, using an invalid pointer is a bug that should be fixed and
> not handled. Use PURIFY to clean up your programs.
> 
> --
> ==========================================================================
> Andrzej Bieszczad                     | Phone:  (613) 763-2259
> Bell-Northern Research, Ltd.,         | Fax:    (613) 763-2626
> Dept. 9K12, P.O. Box 3511, Station C, | email:	andrzej@BNR.CA
> Ottawa, Ontario, Canada, K1Y 4H7      | "Welcome to the machine"-Pink Floyd
> ===========================================================================
> 
Suppose you are writing a utility and want to check that you have 
been passed valid parameters? Isn't Andrzej practicing safe style? :)
Dan
My views are my own; BNR does not necessarily agree; my wife never does.
Xref: sparky comp.lang.c++:14810 comp.lang.eiffel:1246 comp.lang.objective-c:605 comp.lang.smalltalk:2092 comp.software-eng:3690 comp.object:3907 comp.lang.ada:2923
From: jim@bse.com (James C. Youlio)
Newsgroups: comp.lang.c++,comp.lang.eiffel,comp.lang.objective-c,comp.lang.smalltalk,comp.software-eng,comp.object,comp.lang.ada
Subject: European Technical Book Sellers Wanted
Date: Thu, 8 Oct 92 14:38:35 EDT
Organization: Berard Software Engineering, Inc.
Reply-To: jim@bse.com (James C. Youlio)
Distribution: world
X-Mailer: uAccess - Macintosh Release: 1.6v0

I am seeking information on European technical/academic (computer) book resellers,
distributors and book clubs, specifically their names, addresses and phone #'s if
available.  Any information or assistance in this matter would be greatly 
appreciated.

Jim

----------------------------------------------------------------------------
James C. Youlio                                 | Phone: (301) 417-9884
Berard Software Engineering, Inc.               | FAX:   (301) 417-0021
101 Lake Forest Blvd., Suite 360                | E-Mail: jim@bse.com
Gaithersburg, Maryland 20877                    | 
----------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: gs4t@virginia.edu (Gnanasekaran Swaminathan)
Subject: Re: Const and Reference
Reply-To: gs4t@virginia.edu (Gnanasekaran Swaminathan)
Organization: University of Virginia
Date: Thu, 8 Oct 1992 23:08:50 GMT

mittle@siena.watson.ibm.com (Josh Mittleman) writes:
: Shih-Hao Liu writes:
: 4>     char a = '-';
: 5>     const char &b = a;    // error: asignment to constant
: 6> 
: 7>     b = '+';
: 8>     printf("%c\n");       // missing argument; you will get no output
: 
: > What output should we excepted?
: > The CC compiler on Sun yield '+', but gcc give a '-'. Which correct?
: 
: If this compiled at all, then you have serious problems with your compiler:
: At line 5 you are assigning to a constant, which is undoubtedly an error.

I think line 5 is correct as ARM p. 155 says, "A reference to a
const T can be initialized with a const T or a plain T or something
that can be converted into a plain T but not a volatile T."

Also ARM p. 154 says, "... if the reference is to a const an object
of type will be created and initialized with the initializer."
Hence, if you modify variable a above it would not get reflected
in reference b.

Correcting typographical errors we have, 
	a = '+';
	printf("%c\n", b); // will yield '-' as b has not changed

-Sekar
From: ark@alice.att.com (Andrew Koenig)
Newsgroups: comp.lang.c++
Subject: Re: NIHCL
Keywords: C++ NIHCL
Date: 13 Oct 92 03:01:05 GMT
Article-I.D.: alice.23866
Reply-To: ark@alice.UUCP ()
Organization: AT&T Bell Laboratories, Murray Hill NJ

In article <zen.718913004@texas> zen@syl.dl.nec.com (zen kishimoto) writes:

> I have a question regarding the use of NIH.  We are considering to use NIH
> for our product.  Now if we use NIH as is, can we sell the end product
> without any problem?

NIHCL is a `US Government Work.'  That means it is in the public domain,
it is not, and cannot be copyrighted, and anyone may use it for any purpose.
-- 
				--Andrew Koenig
				  ark@europa.att.com
Newsgroups: comp.lang.c++
From: ralph@cs.stanford.edu (Ralph Melton)
Subject: Profiling with g++?
Originator: ralph@Xenon.Stanford.EDU
Organization: CS Department, Stanford University, California, USA
Distribution: comp
Date: 13 Oct 92 04:41:55 GMT

I have used g++ 2.2 to write a program that takes too long.
I would like to use gprof and the -pg option to profile
it.  However, when I try to compile this program with the
-pg option, I get a large number of undefined values of the
form LBB<x> and LBE<x>, where x is a two-digit number.

For unknown reasons, this has not bothered me with other programs.
I can profile some programs successfully, just not the ones I want
to profile.

Can anyone tell me what to do to avoid these problems and get
gprof to work with g++?

Thanks in advance,

Ralph Melton
-- 
"As a hushed commentary on my RL surroundings here... I hate people who think
that stubborn ignorance is cute."
Mike McDermott (Pog)
From: joec@cybernet.cse.fau.edu (joseph cossette)
Newsgroups: comp.lang.c++
Subject: Re: Does Borland C++ 3.1 have good online help?
Date: 15 Oct 92 05:27:14 GMT
Organization: Cybernet BBS, Boca Raton, Florida

I think it's Ok. You get a DOS version of THELP which is a TSR with
a pretty good help database. The Window IDE also has a pretty good online
reference. I believe the DOS IDE also has online help (I've never used 
the DOS IDE).
From: hartman@ulogic.UUCP (Richard M. Hartman)
Newsgroups: comp.lang.c++
Subject: Re: downcasting (was Re: GOTOo wars)
Date: 9 Oct 92 18:54:08 GMT
Article-I.D.: ulogic.408
Organization: negligable

In article <1992Oct6.153133.16772@cadsun.corp.mot.com> shang@corp.mot.com writes:
>If "T" cannot be passed to a narrowed interface by downcast, 
>what's the use of the tagged pointer? I can use Base* for the 
>same purpose.
>
>Type-safe downcast nerver casts objects in different types. 
>I think we should avoid using the wrod "downcast" because it 
>relates to something like type cast. What is the proper word? 
>Will you suggest one? I give the definition as follow:
>
>     ?Downcast? passes an object of type T from an interface C 
>     (C comprises T) to a narrowed interface C' (C comprises C'  
>     and C' comprises T).

Do you mean that we may have been talking about different things
when we've both been saying downcast?

I've been talking about converting a pointer to a base class into
a pointer to one of it's derived classes.  A process which is only 
safe when you KNOW for certain that the pointer actually does point
to an object of that derived class....

Your indented pararagraph there w/ phrases such as "(C comprises T)"
lost me.  Apparently I'm not up on the jargon :)  So I'll write it
in C++:

class Object {...} ;
class StudentObj : public Object { ... };

	Object *pObj = pStudentObj;	// cast "up" to base, ok
	StudentObj *pStu = pObj;	// cast "down" to descendant.  Ok?


		-Richard Hartman
		hartman@uLogic.COM

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Disco isn't dead...			...it's just in witness protection!
From: Bo_Johansson@p1.f104.n901.z92.badnet.bad.se (Bo Johansson)
Newsgroups: comp.lang.c++
Subject: Re: (none)
Date: Mon,  5 Oct 92 18:59:01 +0000
Reply-To: Bo_Johansson@p1.f104.n901.z92.badnet.bad.se (Bo Johansson)
Distribution: world
Organization: Mr Bean's BBS 
OD-Comment-To: Yann_David

In a message of < 1-Oct-92 11:25> Yann David (92:901/-24472) wrote:

 YD> It seems that the linker does not recognize those static
 YD> variables. For example, the following program:

 YD>   class MyClass
 YD>   {     static int a=0;
 YD>     public:
 YD>         void incA();
 YD>   };

 YD>   void MyClass::incA()
 YD>   {     a+=1;
  
 You could try " int MyClass::a+=1; " instead

 YD>         cout<<a;
 YD>   }
Regards Bosse
---
From: maxc0452@ucselx.sdsu.edu (Legene)
Newsgroups: comp.lang.c++
Subject: temporary return object question
Summary: I want to know if I'm doing this right.
Keywords: return
Date: 14 Oct 92 21:47:10 GMT
Organization: San Diego State University Computing Services


     I made a string class, and found that of course you need to
let the compiler make ordinary c-type strings out of my strings.  So
I made a special, temporary C string class that holds its data like a
C string does.
     My major string class is String, the temporary string class is
TempCString.  My conversion operator from String to char * has a line
like this in it:

return TempCString (*this);

Now TempCString is a friend of String, I have all the conversion operators.
TempCString's constructor gets space for a char array, copies the String's
data to it, puts a null byte on the end, all of that is fine.  The
destructor should de-allocate the space, fine as well.  But can I be sure
that if I pass a String to a function expecting a char *, that the
TempCString I return won't be destroyed until it's OK?  Even if I
have another cast from String to char * inside the function I've already given
a char * from a String to?

Any help would be appreciated.

E-mail is just dandy.
From: eddy@aludra.usc.edu (George Edmond Eddy)
Newsgroups: comp.lang.c++
Subject: C++ concious line counter?
Date: 14 Oct 92 18:09:12 GMT
Organization: University of Southern California, Los Angeles, CA
NNTP-Posting-Host: aludra.usc.edu

Can anyone let me know if/where i can find a source code line counter
for C++, that is, one that will count the number of lines that are commeents,
source, etc.

I know this is a silly way to run metrics on software
but, i've been asked by the powers to be....

I'd really appreciate any help i can get, BTW - were using
g++.

thanx!

--

- rusty

eddy@usc.edu
ORGANIZATION: JOHANNES KEPLER UNIVERSITY LINZ - COMPUTING CENTER
Date: Wednesday, 7 Oct 1992 11:23:23 CET
From: Werner Noska <K3022E8@ALIJKU11.BITNET>
Newsgroups: comp.lang.c++
Subject:  C++ Source-Code Beautifier

Does anybody know if there is a source-code beautifier (doing intends, case-
conversion for variables automatically) for Borland C++ 3.0 programs.

Mail would be appreciated|

Thanks in advance,

Werner N.
From: tmb@arolla.idiap.ch (Thomas M. Breuel)
Newsgroups: comp.lang.functional
Subject: Re: Resource control (was: Re: Why curry?)
Date: 10 Oct 92 21:35:21 GMT
	<1992Oct8.124228.10449@kth.se> <1b1f3pINNde6@early-bird.think.com>
	<1992Oct9.114226.28196@kth.se>
Reply-To: tmb@idiap.ch
Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
	Perceptive)
In-reply-to: kff@dentex.tds.kth.se's message of 9 Oct 92 11:42:26 GMT

In article <1992Oct8.124228.10449@kth.se> kff@dentex.tds.kth.se (Karl-Filip Faxen) writes:
>In article <TMB.92Oct7181835@arolla.idiap.ch>, tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
>
>|> (in fact, not having this
>|> control over evaluation and resources is precisely why I don't like
>|> lazy evaluation).
>
>And it is precisely why I like it. I believe that the "creative" part
>of an algorithm is specifying the data dependencies. Then a good
>compiler should be able to come up with an evaluation order that is at
>least as efficient in terms of resource (eg memory) consumption,
>locality and (when the machine can take advantage of it) parallelism,
>as any I could come up with myself with a reasonable amount of work.

Well, then don't hold your breath for "good compilers". Decisions like
these are input data dependent and/or require a significant
understanding of the meaning of the algorithm you are implementing. A
compiler has neither, nor can it.

Based on runtime/profiling information, some optimizations like these
can be carried out, but both the overhead and the effort involved for
the programmer are non-trivial (in particular, there are many cases in
which I don't even run the same program more than once).  I find it
easier to state in advance what I know about my algorithm.

   It may be that annotations are a good idea, separating data dependencies
   from resource management decisions.

Well, yes. And taking advantage of eager evaluation for these kinds of
"annotations" seems to be quite natural. Why change this?

					Thomas.
Newsgroups: comp.lang.functional
From: kff@dentex.tds.kth.se (Karl-Filip Faxen)
Subject: Resource control (was: Re: Why curry?)
Reply-To: kff@dentex.tds.kth.se (Karl-Filip Faxen)
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Fri, 9 Oct 1992 11:42:26 GMT

In article <1b1f3pINNde6@early-bird.think.com>, bromley@think.com (Mark Bromley) writes:
|> In article <1992Oct8.124228.10449@kth.se> kff@dentex.tds.kth.se (Karl-Filip Faxen) writes:
|>
|> >Then a good
|> >compiler should be able to come up with an evaluation order that is at
|> >least as efficient in terms of resource (eg memory) consumption,
|> >locality and (when the machine can take advantage of it) parallelism,
|> >as any I could come up with myself with a reasonable amount of work.
|> 
|> My somewhat uninformed but not completely naive opinion is that this is
|> expecting way too much from the compiler, and that in fact some level of
|> control of resources is almost as much a part of the algorithmic process as
|> specifying data dependencies.

It is quite possible that you're not completely and utterly wrong. On the
other hand, things are progressing in that direction, albeit slowly. Think
of register allocation, for instance: I don't think that I would do much
better than a modern intermodule register allocator that based its
decisions on profile information, especially not without spending a clearly
unreasonable amount of work. 

Early examples of what I think of are e.g. the work being done on making 
instruction schedulers taking register pressure into account, and blocking
optimizations for registers or caches.

The problem of whether something like this could be made to scale to larger
datastructures than scalar variables and larger segments of text than procedure
bodies is of course an open, and in my opinion, very interesting one.

|> Note that I am somewhat biased in this matter.  The company I work for has
|> managed to do quite well by taking almost exactly the opposite point of
|> view from that expressed above.

I know. We've got a CM-2 at our school. 

|> I think there is a happy medium somewhere between the two extremes.

It may be that annotations are a good idea, separating data dependencies
from resource management decisions. Fortran D could be seen as an example
of this, as can the Yale group's (Paul Hudak et al) work on parafunctional
programming.

Cheers,
         Karl-Filip

------------------------------------------------------------
Make the frequent case fast, and the fast case frequent!