HDTenEightyP/NetNews huggingface dataset:
From: martin@matilda.vut.edu.au (Martin Schweitzer)
Newsgroups: comp.lang.c++
Subject: Re: C++ Style
Date: 28 Sep 92 22:34:37 GMT
Organization: Victoria University of Technology

>|> Is there a stylistic advantage for puting the declarations closer to where
>|> I use them? 
>|> 
>|> Mike Kirby
>|> kirby.roch803@xerox.com
>|>  
>
>
>> 
>> The pundits would have you believe that the code is easier to read because
>> the declaration is nearby.  I guess that they are right.  In ANSI C, for
>> example, you can declare variables with just about the same freedom as in
>> C++, so your main() would compile with an ANSI conformant C compiler.

I have my doubts about whether declarations placed close to the code
in which it is referenced enhance readability.  I think that there are
some good reasons to place declarations close to where they are 
referenced, but from a point of readability, I think that I find my code
more readable if at the top of each function I have all my declarations.

This then acts as a sort of index of identifiers.  If I want to get 
some information about a particular identifier, I know exactly where
to look.

MHO.

Martin


-- 
----------------------------------------------------------------------------
Martin Schweitzer
Victoria University of Technology
Footscray, Australia
Newsgroups: comp.lang.c++
From: pvonk@scott.skidmore.edu (Pierre VonKaenel)
Subject: Re: BC++ 3.0 TDW and Windows 3.1
Organization: Skidmore College, Saratoga Springs NY, 12866
Date: Fri, 2 Oct 1992 13:17:55 GMT

In article <tpenttin.718029822@majakka.uku.fi> tpenttin@majakka.uku.fi (Tommi Penttinen) writes:
>"Can't load WINDEBUG.DLL". That's what my TDW tells me when I try to debug
>anything.. And I'v put WINDEBUG.DLL on the dos command path as told in a
>readme file on the distribution disk. So, what's the problem? Doesn't
>BC++ 3.0's Turbo Debugger for Windows work with Windows 3.1?

I believe that MS decreed, "I shall change Windows sufficiently in
version 3.1 that all of you developers will have to come out with
update versions of your software - and we will all profit from it."


-- 
Pierre von Kaenel	| Skidmore College	     | pvonk@skidmore.edu
Math & CS Dept.		| Saratoga Springs, NY 12866 | (518)584-5000 Ext 2391

[.... old sig has been retired.  New sig isn't ready yet. ]
Newsgroups: comp.lang.c++,comp.std.c++
From: pfbertra@watcgl.uwaterloo.ca (Philippe F. Bertrand)
Subject: Re: The concept of templates considered ill designed
Organization: Computer Graphics Lab [CGL], University of Waterloo
Date: Sun, 4 Oct 1992 18:22:25 GMT

In article <1992Oct2.153826.12051@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
>In article <1992Oct1.140643.9775@cadsun.corp.mot.com> shang@corp.mot.com writes:
>>
>>Thank you, Raymond, for raising this thread. I'd like to fork it
>>to comp.std.c++ for standard committee to reconsider whether template should be  
>>accepted as C++ standard.
>
>	How would you modify the template idea to be better?

It would be nice if templates could have some sort of base class derivation
rules.  Ie instead of < class T > have <class Foo T> which restricts T to be
a class publicly derived from Foo.

Also for code hiding, compilers should generate intermediate files for
templated code so that user's of a template class do not need to have access
to the source.

- Philippe F. Bertrand                          pfbertrand@watcgl.uwaterloo.ca 
Computer Graphics Lab, Department of Computer Science,
University of Waterloo, Waterloo, Canada  N2L 3G1
Newsgroups: comp.lang.c++
From: gfung@dazixca.ingr.com (Glenn H. Fung,7543,)
Subject: TI class library (wanted)
Reply-To: gfung@dazixca.ingr.com
Organization: Sun Microsystems, Inc.
Date: Wed, 30 Sep 1992 23:38:45 GMT


I am looking for an C++ class library, its name probably called TI class lib from Texas Instrumnet. 
I am involved in a graduate project which require that library.
Please email me the information if you can.

Thanks in advance
Newsgroups: comp.lang.c++,cs.help
From: pjl@sparc10.cs.uiuc.edu (Paul Lucas)
Subject: Re: yacc in c++?
Keywords: yacc, bison, c++
Organization: University of Illinois at Urbana-Champaign
Distribution: usa
Date: Tue, 29 Sep 1992 01:18:45 GMT

In <BvB5oD.4FD@cs.columbia.edu> igor@cs.columbia.edu (Igor Pankevich) writes:

>I am a student (forgive me if this is a FAQ, I couldn't find the
>answer at my site.)  I need to write a yacc grammar that will work
>with my c++ program.  Where can I find a version of yacc to do this?

*****>	Standard yacc works with C++; you just have to write your own
	.y.c (or .y.o) rule to replace the "extern char *malloc()" line
	with "#include <stdlib.h>"
-- 
	- Paul J. Lucas				University of Illinois	
	  AT&T Bell Laboratories		at Urbana-Champaign
	  Naperville, IL			pjl@cs.uiuc.edu
Newsgroups: comp.lang.c++
From: rmartin@donner.Rational.COM (Bob Martin)
Subject: Re: Only 'public' stuff in .h file?
Organization: Rational
Date: Wed, 7 Oct 1992 03:56:16 GMT

I meant .h file, not .cpp file...   


--
Robert Martin                        Training courses offered in:
R. C. M. Consulting                       Object Oriented Analysis
2080 Cranbrook Rd.                        Object Oriented Design
Green Oaks, Il 60048 (708) 918-1004       C++
From: checker@acf5.NYU.EDU (checker)
Newsgroups: comp.lang.c++
Subject: template typedefs (was:Re: declare keyword, type inference)
Date: 4 Oct 92 23:53:35 GMT
Organization: New York University

ark@alice.att.com (Andrew Koenig) writes:
>> 	template <class T> typedef Array<Array<T> > Foo;
>Does this buy anything over
>	template <class T> class Foo: public Array<Array<T> > { }

If Array<T> has a non-default ctor, you'd need to rewrite it.

Chris
From: masa@hpscit.sc.hp.com (Masayoshi Habu)
Date: Thu, 1 Oct 1992 19:29:15 GMT
Subject: Re: C++ Vs C for a GUI
Organization: Hewlett-Packard, Santa Clara, CA
Newsgroups: comp.lang.c++

In comp.lang.c++, c23rrj@kocrsv01.delcoelect.com (Rajnish Joshi) writes:


> I am not quite familiar with C++. I will appreciate it a lot if
> someone will tell me some distinct advantages of C++ over C .
> We are using X/Motif to develop a GUI for a large application & we have to
> make a selection between C and C++.

I can only give you my personal opinion. We started out with C++ because
it would help building a large applicatoin by reusing parts that we made
in the project itself. While this goal was satisfied, we also had to use
Motif for GUI. That means we created C++ classes to deal with Motif widgets.
A widget is nothing more than an window object expressed in C. However,
because of C and C++ mixture, we could not force proper encapsulation
that C++ offers. I would use Interview if I had a supported library of
Interview (e.g. Interview Plus from HP).

Masa
Newsgroups: comp.lang.c++
From: berman@gboro.glassboro.edu (Mike Berman)
Subject: Books on c++
Organization: Glassboro State College
Date: Tue, 6 Oct 1992 14:33:34 GMT

c++ users:

	I'd be interested in your opinions on the following:

	What are your favorite books on c++ and
object-oriented programming?  In particular, I'm interested in
books that address data abstraction, data structures, and
object-oriented programming, but I'm interested in any c++
books you think are worthwhile.

	The reason I ask is that I'm researching the
possibility of writing a c++ book myself.  

	Please respond by email, and I will summarize to the
net if I have anything to summarize.

	Thanks very much.

	Michael Berman, Rowan College, berman@glassboro.edu

-- 
===========================================================================
A. Michael Berman    Assistant Professor     Department of Computer Science
Rowan College of New Jersey, Glassboro NJ 08028 USA. Voice: +1 609 863-6521 
Fax: +1 609 863-6553 Internet: berman@gboro.glassboro.edu 
Xref: sparky comp.lang.c++:14547 comp.std.c++:1316
From: tmb@arolla.idiap.ch (Thomas M. Breuel)
Newsgroups: comp.lang.c++,comp.std.c++
Subject: Re: The concept of templates considered ill designed
Date: 6 Oct 92 00:01:13 GMT
	<0enxJ1W00awTMNepU8@andrew.cmu.edu>
	<1992Oct5.160022.29224@genghis.borland.com>
Reply-To: tmb@idiap.ch
Followup-To: comp.lang.c++
Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
	Perceptive)
In-reply-to: pete@genghis.borland.com's message of 5 Oct 92 16:00:22 GMT

In article <1992Oct5.160022.29224@genghis.borland.com> pete@genghis.borland.com (Pete Becker) writes:

   [discussion of how to go about adding various forms of type constraints
   to template arguments deleted]

	   But this has very little to do with templates.  Constrained parameters
   and no further knowledge of the actual type is equivalent, as far as I can see,
   to simply carrying around a pointer to the actual class, and dealing with it
   only through the known interface.  You don't need templates to implement this,
   and I don't see that there's anything gained by using the template mechanism
   to do it.

That's not true. Unlike when you rely on inheritance, you can use a
template with any type that has the needed operations defined on it.
The type doesn't have to inherit from some common base type. The type
doesn't even have to be a class/struct.

For example, it is quite frequent that people write numerical template
code that works with an object that is vaguely number like. You'd like
to be able to use it with the built-in numerical types, as well as any
user defined types, as well as any types from a commercial library.
None of those types will inherit from one another, or from a common
"Number" type, nor is it entirely trivial to make this happen.

Another important reason is efficiency. Templates will generate code
that is specialized for the exact types that I'm using.

A third reason is that for templates, unlike for "dealing with classes
through a known interface", I can express type relationships between
arguments, and between arguments and return types.

	template <class A> A f(A x,A y) { ... }

is a very different function from

	A g(A x,A y) { ... }

even if all the objects you hand to "f" are subtypes of "A".

Allowing constraints on template arguments has proven to be very
useful in other languages. I think such a feature would be very
important in C++ as well. I would like to see both inheritance based
constraints and signature based constraints.

					Thomas.
Newsgroups: comp.lang.c++
From: cope@cbnewsb.cb.att.com (james.o.coplien)
Subject: Object Design Database Management System Demo in Naperville
Keywords: DBMS ObjectStore
Organization: AT&T
Distribution: il
Date: Thu, 1 Oct 1992 19:17:14 GMT

Object Design will be demoing their object-oriented database management system
at the Naperville Inn (formerly the Sheraton), October 16th, 1992.  There are
two sessions, one from 9-noon preceded by a contiental breakfast at 8:30;
another 2-5 with a light snack at 1:30.

You are asked to register in advance by calling (617) 270-9797, x248.  The
registration number for this demo is SP01.

The hotel is near the intersection of Naperville Road and I88 in Naperville.
Newsgroups: comp.lang.c++
From: stefans@bauv106.bauv.unibw-muenchen.de (Stefan Schwarz)
Subject: Re: The concept of templates considered ill designed
Organization: Universitaet der Bundeswehr Muenchen (Germany)
Distribution: comp
Date: Tue, 29 Sep 1992 08:13:57 GMT

ark@alice.att.com (Andrew Koenig) writes:

>In article <RAYMOND.92Sep28145010@cobra.es.ele.tue.nl> raymond@es.ele.tue.nl (Raymond Nijssen) writes:

>	<example deleted>

>> Now, if the _definition_ of the constructor of the ape class isn't textually
>> included in the file in which the template is instantiated, the linker will
>> complain that there's no code for this constructor in ape.o.

>This is an artifact of the implementation.  For example, under cfront 3.0,
>I can do the following:

>-----------------------ape.h-----------------------
>template <class T> class ape {
>public:
>	ape();
>};

>-----------------------ape.c-----------------------
>template<class T> ape<T>::ape () {}

>-----------------------main.c-----------------------
>#include "ape.h"

>main()
>{
>	ape<int> chimp;
>	return 0;
>}


>and I can say

>	CC main.c

>and all will compile and link automatically.

Well, this only works because the linker invokes a compile on a temporary
file which looks like:
#include <ape.h>
#include <ape.cc>

typedef ape<int> _dummy_;

So you must have the source code for all your templates available when
linking your program.
Would be interesting to hear from library-developers about shipping their
products together with source-code.

Stefan
-- 
________________________________________________________________________________
Stefan Schwarz                            University of the armed forces, Munich
Laboratory for graphical data processing  W-8014 Neubiberg, FRG
--------------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: brendan@cygnus.com (Brendan Kehoe)
Subject: Re: question about delete
Reply-To: brendan@cygnus.com
Organization: Cygnus Support, Palo Alto, CA
Date: Fri, 2 Oct 1992 23:52:01 GMT

In article <20907@plains.NoDak.edu> heilig@plains.NoDak.edu (Zachary Heilig) writes:

   why does foo != NULL in the following example.  You would think that since
   I deleted foo it would be NULL, or at least still point to the same spot
   in memory, but evidentally, it doesn't even do that.  Where is foo pointing?

According to ARM section 5.3, the effects of accessing an object after
it's been deleted is undefined, and the deletion of an object may
change its value.  When I ran your test, foo happened to have the same
value.  Nothing ever said that foo would be cleared out.

--
Brendan Kehoe                                               brendan@cygnus.com
Cygnus Support, Palo Alto, CA                                  +1 415 322 3811
                                                 Re-elect Clinton/Gore in '96!
Newsgroups: comp.lang.c++
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: downcasting (was Re: GOTOo wars)
Organization: Computer Science, University of Melbourne, Australia
Date: Thu, 1 Oct 1992 11:58:06 GMT

hartman@ulogic.UUCP (Richard M. Hartman) writes:

>We're using the NIH Linked List.  When you get something off
>the list it is just an Object *.  To actually use it you have
>to downcast it to it's proper (and hopefully Object-derived :)
>class.  If someone knows a way around this, please let me know
>and I will *gladly* give up my use of castdown......

The Politically Correct way of doing this, I believe, is to use a template
linked list class. (Look Ma, no casts! :-)

-- 
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!
Newsgroups: comp.lang.c++
From: stefans@bauv106.bauv.unibw-muenchen.de (Stefan Schwarz)
Subject: templates and const parameters
Organization: Universitaet der Bundeswehr Muenchen (Germany)
Date: Mon, 28 Sep 1992 09:17:59 GMT

The following peace of code causes trouble when compiling:

template<class T> class A
{
private:
	T _a;
public:
	A(void) {}
	void set (const T a) { _a = a;}
};

main()
{
	A<int*> a;
	const int *x = new int(1);
	a.set(x);
}

error: bad argument  1 type for  A <int *>::set(): const int * ( const int * expectd)

The problem doesn't occur with a class A<int>.

Thanks for any help,
Stefan
-- 
________________________________________________________________________________
Stefan Schwarz                            University of the armed forces, Munich
Laboratory for graphical data processing  W-8014 Neubiberg, FRG
--------------------------------------------------------------------------------
From: jmowen@mona.Gwinnett.COM (John M. Owen)
Newsgroups: comp.lang.c++
Subject: Re: Borland C++
Date: 1 Oct 92 13:07:33 GMT
Organization: Flat On My Back in Bed With Mona, Duluth, GA, USA

j_theof@pavo.concordia.ca (THEOFANOPOULOS, JOHN) writes:

> [...]
> I'm planning on purchasing Borland C++ v.3.1, and have a question.  I current
> a choice between getting the regular version or paying $120.00 more and
> getting the version with Application Frameworks.
> 
> Most of my work (all of it actually) is done in DOS, and all my programs
> are made to run under DOS, so would this Application Frameworks really
> help me?  I spoke to a Borland Rep and he wasn't too much help in 
> telling me what Application Frameworks really is (what kind of functions
> etc.)...

Hmm, I got BC++ 3.1 & AF and it is difficult for me to unbundle them. 
I did get quite a bit of source tho, including the runtime. As I 
understood it, Application Frameworks meant Object Windows Library (OWL)
and Turbo Vison (a dos based text windowing framework). There were 
only two manuals (out of ?13) covering this. I used an upgrade offer 
& paid US$195 (+tax&shipping) for the set (from Turbo C++ DOS).


-- jmowen@mona.Gwinnett.COM (John M. Owen) 
-- My .sig is bigger than yours - but I keep it offline.
From: Neal.Sanche@ttlg.UUCP (Neal Sanche)
Newsgroups: comp.lang.c++
Subject: Persistent object grief!
Date: 4 Oct 92 00:21:02 GMT

Hello, I have been using Borland C++ 3.0 to create an object database
where the objects are written to a stream. I am getting errors whenever
I write floats to the stream in my TStreamingOb::write and ::read
methods. According to the Turbo Vision stream library documentation
I should be able to do it, but the compiler complans that the proper
overridden operator does not exist. I am using large model, would
that make a difference? The errors seem to suggest that it cannot
find an operator to handle far references to floats.

Hopefully someone has an answer for this one... I have had to resort
to using the writeBytes() function to output the floats.

-Neal

 * OLX 2.1 TD * Multitasking causes schizophrenia..

 * Origin: Paradigm BBS: A programmer's paradise. (42:100/11)
From: udparmet@mcs.drexel.edu (Daniel J. Parmet)
Newsgroups: comp.lang.c++
Subject: MPW C++
Date: 1 Oct 92 18:33:05 GMT
Organization: Drexel University, Dept. of Math. and Comp. Sci.

What files or libraries are needed to compile and link C++ programs using
MPW C++?

More specifically, I am trying to include the <iostream.h> file, but when 
linking, the compiler says that it cannot find this file.  I thought that it 
would be in the CPlusLib.o library, but it does not seem to be.

Please reply by mail.

Thank you.

-- 
********************************************************************************
*                  Daniel J. Parmet (udparmet@mcs.drexel.edu)                  *
*                   "If it's too loud, then you're too old!"                   *
********************************************************************************
From: ark@alice.att.com (Andrew Koenig)
Newsgroups: comp.lang.c++
Subject: Re: declare keyword, type inference
Date: 4 Oct 92 21:37:15 GMT
Article-I.D.: alice.23797
Reply-To: ark@alice.UUCP ()
Organization: AT&T Bell Laboratories, Murray Hill NJ

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

> 	template <class T> typedef Array<Array<T> > Foo;

Does this buy anything over

	template <class T> class Foo: public Array<Array<T> > { }

?
-- 
				--Andrew Koenig
				  ark@europa.att.com
Newsgroups: comp.lang.c++,gnu.g++.help
From: sasghm@theseus.unx.sas.com (Gary Merrill)
Subject: Re: Interaction templates/const member functions
Originator: sasghm@theseus.unx.sas.com
Date: Mon, 28 Sep 1992 17:59:30 GMT
Distribution: usa
Organization: SAS Institute Inc.


In article <35709@hoptoad.uucp>, brendan@cygnus.com (Brendan Kehoe) writes:
|> In article <1992Sep25.134347.3603@sunb10.cs.uiuc.edu> pjl@sparc10.cs.uiuc.edu (Paul Lucas) writes:
|> 
|>    In <1992Sep24.213609.25858@CS.ORST.EDU> budd@fog.CS.ORST.EDU (Tim Budd) writes:
|> 
|>    >Don't know if this is a bug in g++ (version 2.2) but it seems to
|>    >disagree with my reading of the ARM.  This has to do with an odd
|>    >iteraction between template classes and constant member functions.
|> 
|>    	   Yes; use AT&T C++ 3.0.  It compilies your code with only a warning
|> 	   about your c'tor not having a const T& when you pass a 5 to it
|> 	   since it has to create a temporary.
|> 
|> This is absolutely not the right solution.  You're first, paying for
|> software, and second, paying USL, whose attack on all of the free
|> computing world by suing BSDI and the regents of UCB for their
|> collective work is decidedly unfriendly.
|> 
|> Rather, wait until GCC 2.3 (early October), where this bug is fixed,
|> and continue to enjoy the rights of using free (including full source
|> code).

Absolutely!  And please in the future go over your postings to ensure that
no more abhorant politically incorrect suggestions slip out.  If you have
trouble with the free GCC and need help quickly, I think you could probably
*buy* support from someone.  But offhand I can't remember exactly who that
would be.

-- 
Gary H. Merrill  [Principal Systems Developer, C Compiler Development]
SAS Institute Inc. / SAS Campus Dr. / Cary, NC  27513 / (919) 677-8000
sasghm@theseus.unx.sas.com ... !mcnc!sas!sasghm
Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: declare keyword, type inference
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Mon, 5 Oct 1992 07:48:22 GMT

In article <23797@alice.att.com> ark@alice.UUCP () writes:
>In article <TMB.92Oct4201915@arolla.idiap.ch> tmb@idiap.ch writes:
>
>> 	template <class T> typedef Array<Array<T> > Foo;
>
>Does this buy anything over
>
>	template <class T> class Foo: public Array<Array<T> > { }
>

	Yes. One very annoying thing in C++, especially templates,
is that constructors are not inherited. The typedefed Foo
has user constructors, the derived on doesnt.

	Many of us are annoyed with this I think, often we
have a class B and want to add one more function,
so we derive a class D from it and have to redefine all
the user constructors. That redefinition is trivial:

	D::D(T1 t1, T2 t2, ...) : B(t1, t2, ...) {}

but there could be lots of them.

	Probably, the function should have been added as a global
function. In general, it doesnt make sense to inherit constructors.

	
-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
Newsgroups: comp.lang.c++
From: pete@genghis.borland.com (Pete Becker)
Subject: Re: Exception handling & Borland C++ 3.1
Originator: pete@genghis.borland.com
Organization: Borland International
Date: Mon, 28 Sep 1992 17:20:00 GMT

In article <1992Sep27.231910.1@jaguar.uofs.edu> das11@jaguar.uofs.edu writes:
>
>From :        David A. Sobeski
>              University of Scranton & Shared Research Corporation
>              das11@jaguar.ucs.uofs.edu
>
>Description : I am creating a generic stack package.  In this package I would
>              like to use exceptions as defined by Bjarne Stroustrup in his
>              book The C++ Programming Language (pg 293 - 324).
>
>              I am using BORALAND C++ Version 3.1 for Windows.  Nowhere within
>              its documentation does it mention try, throw, and catch. 
>              However, if you type these words in, the editor will boldface
>              them as if they are apart of the language.
>
>              When using a throw within a class, I get the error that I can
>              not define a throw in an inline function.  Also, when I put a
>              try in the source, it tells me illegal syntax.
>

	We currently do not support exceptions.  The keywords are recognized
as part of the language, so that people won't get in the habit of using them
in other contexts.
	-- Pete
Newsgroups: comp.lang.c++
Subject: Experiences w/ MS C++ 7.0 Templates
From: BIELSIKFJ@MAIL.BECKMAN.COM (Frank J Bielsik)
Date: Fri, 2 Oct 1992 20:41:28 GMT
Organization: Beckman Instruments Inc. 2500 Harbor Blvd. Fullerton, CA 92634

Has anyone had any experience using MS C++ 7.0's kludge for templates?  Does 
it work well enough to be worth using?  Comments would be appreciated.

Thanks,
Frank Bielsik
Beckman Instruments
Newsgroups: comp.lang.c++