HDTenEightyP/NetNews huggingface dataset:
From: schmidt@rz.uni-passau.de (SCHMIDT GUIDO)
Newsgroups: comp.lang.c++
Subject: Re: Wanted: C++ Classes
Date: Wed, 27 Jan 1993 15:28:16 GMT
Organization: University of Passau - Germany
NNTP-Posting-Host: hiwi170.rz.uni-passau.de

In article <1954@alcbel.be> sp_ppm@space.alcbel.be (Paul Moore) writes:

>Hello,

>I'm looking for freely available C++ classes, mainly to improve me knowledge of the language. I remember reading somewhere about sites that have these available, but 
>I've forgotten where they are.

>Can anyone help me by letting me know where I can locate some?

>Thanks in advance, Paul

>---
>Paul Moore,                      email: sp_ppm@space.alcbel.be
>ALcatel Bell Telephone,
>Berkenrodelei 33,                phone: (+32) 3/829.5024
>2660 Hoboken,
>Belgium.

Hello!

I recently got the class library LEDA 3.0 from ftp.uni-sb.de in pub/LEDA.
It contains very powerful classes. It has many different container classes
like stacks, queues, lists, dictionaries, hash_arrays etc. All these are
implemented with very good algorithms, so they are very fast.
See this short code example:

	#include <LEDA\h_array>

	main()
	{
		h_array<string, string> h; // german-english dictionary

		h["Stuhl"] = "chair";
		h["Tisch"] = "table";

		string s;
		forall_defined(s, h) cout << s << ":" << h[s] << endl;
	}

put and get operations via operator[] have a complexity of O(1)!
There is a version with and without templates.

Guido.
--------------------------------------------------------------------
- Guido Schmidt                                                    -
- schmidt@rz.uni-passau.de                                         -
- Universitaet Passau, Germany                                     -
--------------------------------------------------------------------
From: raymond@es.ele.tue.nl (Raymond Nijssen)
Newsgroups: comp.lang.c++
Subject: Re: DOS, BC++, Need, large data memory, how?
Date: 22 Jan 93 12:25:51 GMT
Organization: Eindhoven University of Technology, Eindhoven, The Netherlands
In-reply-to: andy@federation.gatech.edu's message of 20 Jan 93 01:32:04 GMT

In article <80830@hydra.gatech.EDU> andy@federation.gatech.edu (Andy Register) writes:

>   5. Use a 32-bit compiler (GNU was the only one suggested.)

It also happens to be the only one you can get for free :-))

-Raymond

--
Raymond Nijssen             | Eindhoven University of Techology
       phone: +31-40-473373 | Department of Electrical Engineering
       fax:   +31-40-464527 | Design Automation Section (ES),  room EH 7.16
"WP is for morons"          | PO. Box 513, 5600 MB Eindhoven, The Netherlands
From: KOCHER@nvdv.e-technik.uni-stuttgart.dbp.de (HARTMUT KOCHER)
Newsgroups: comp.lang.c++
Subject: Re: References to functions?
Date: 25 Jan 1993 09:49:33 GMT
Organization: University of Stuttgart, IND (Germany)
Distribution: world
NNTP-Posting-Host: nvdv01.ind.e-technik.uni-stuttgart.de
X-News-Reader: VMS NEWS 1.24

In <1993Jan21.173352.10406@taumet.com> steve@taumet.com writes:

> fritz@mtl.mit.edu (Frederick Herrmann) writes:
> 
> >I tried to declare a reference to a function, but found that g++
> >wouldn't let me.  After scanning ch. 8 of the ARM, I interpret it to
> >forbid function references, but it's not all that clear (see below).
> 
> References to functions are legal, but not very useful.  I can't
> think of anything you can do with a reference to a function you
> can't do with a const pointer to a function in exactly the same way,
> except for trivial syntax differences at the point of initialization.
> You use them in exactly the same way.
> 
> stuff deleted
-- 
> 
> Steve Clamage, TauMetric Corp, steve@taumet.com

Not exactly. Let's say I have a callback class which takes a pointer
to a function in its constructor. If I use a pointer, a 0-pointer may be
passed. If I use a reference instead, I can make sure, that the user
supplies a valid function.

B.T.W.: Are references to member functions also legal?

Hartmut Kocher

Newsgroups: comp.lang.c++
From: gs4t@virginia.edu (Gnanasekaran Swaminathan)
Subject: Re: operator = with inheritance
Organization: University of Virginia
Date: Thu, 21 Jan 1993 16:21:16 GMT

maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
: 	It wont cope with class C: public A though:
: this will still slice the A part of a C object onto the A part
: of a B object. What else COULD it do?

	A
       / \
      B   C

Since, B and C has only A part common, that is
the appropriate thing to do, isn't it?
Newsgroups: comp.lang.c++
From: suresh@papaya.iss.nus.sg (Suresh Thennarangam - Research Scholar)
Subject: Re: Borland C++ Complete?
Organization: Institute Of Systems Science, NUS
Date: Thu, 21 Jan 1993 04:18:55 GMT

In article <1993Jan18.094026.24916@jarvis.csri.toronto.edu> byu@sys.toronto.edu (Benjamin Yu) writes:
>In article <1993Jan16.075038.16467@netcom.com> donahn@netcom.com (Don Ahn) writes:
>>In article <1993Jan15.123610.9073@jarvis.csri.toronto.edu> byu@sys.toronto.edu (Benjamin Yu) writes:
>>>1) I can't overload a function with default arguments in 
>>>Borland C++.  For example:
>>>    void initialize(int X = 0, int Y = 0);
>>>    void initialize();
>>>    Y.initialize();   <<- fails in compile
>>	This is definitely an error,  you have no way of knowing
>>	which initialize to call (i.e. do you mean initialize(0,0)
>>	or initialize(void) ? If you look on page 316 of the 
>>	Annotated c++ ref. manual, you will see that Stroustrup
>>	agrees.
>>	
>
>Hmm, I am not sure which definition I should follow.  I don't have ARM but have
>The C++ Programming Language Second Edition by Stroustrup.  On page 588, I quote:
>
>   "A call of a given function name chooses, from among all functions by that name
>    that are in scope and for which a set of conversions exists so that the
>    function could possibly be called, the function that best matches the
>    actual arguments."
>
>It then gives a whole list of conversion rules.  So Y.initialize() best matches
>initialize(void), and that should be called!

Which conversion rule have you applied to draw this conclusion ?

Perhaps [1] Exact match: Sequences of zero or more trivial conversions are 
			better than all other sequences. ..........

However in the above case that Benjamin  has stated there are no conversions 
required for either candidate(to my knowledge :->). Default arguments does not 
mean that a conversion from void to the type of the formal argument is made. 
Indeed such a conversion is illegal.



      __                  
     (_   / /  o_   o  o |_
     __)/(_( __) (_(_ /_)| )_

***************************************************************************
* Suresh Thennarangam               *  EMail: suresh@iss.nus.sg(Internet) *
* Research Scholar                  *         ISSST@NUSVM.BITNET          *
* Institute Of Systems Science      *  Tel:  (065) 772 2588.              *
* National University Of Singapore  *  Facs.: (065) 778 2571              *
* Heng Mui Keng Terrace             *  Telex: ISSNUS RS 39988             *
* Singapore 0511.                   *                                     *
***************************************************************************
Newsgroups: comp.lang.c++
From: kanze@us-es.sel.de (James Kanze)
Subject: Re: C++ develpment environments
Organization: SEL
Date: 26 Jan 93 16:57:36


|> In article 11431@netcom.com, erc@netcom.com (Eric Smith) writes:
|> "
|> "> "I heard a rumor that ObjectCenter costs $4000 per copy.  Is this true?
|> "> "Why on earth would anyone charge $4000 for a software product?  Don't
|> "> "you want to make it popular?  How can you get all the bugs out if you
|> "> "don't have zillions of users sending in bug reports?  And how can you
|> "> "get zillions of users if you charge that much?

|> First rule of a free market is: charge what the market will bear.
|> Since there aren't any "zillion" workstation users AND the few
|> thousand that do exist usually work for companies that can afford
|> these ridiculous prices, $4000 gets charged.  Besides, CenterLine's
|> prices are "average" when it comes to workstation development
|> environments (not to excuse those prices...in my opinion, neither
|> CenterLine nor any of the other development environments provide
|> thousands of dollars more capability when compared to a PC product
|> such as Borland C++...until CenterLine releases the new version of
|> ObjectCenter, Borland C++, at $100, even provides something those
|> workstation environments don't: compiled headers...If anyone has any
|> benchmarks, I'd be interested in seeing how well Borland's
|> compile/link cycle stacks up to workstation products :-)

I don't think it is just linked with the attitude of "charge what the
market will bear".  A major part of the price of software is
development.  This is a one time price that must be spread over the
number of potential sales.  As there are maybe 100 times more PC's
than workstations out there, the development costs part of the price
of workstation software will be 100 times higher than that of PC
software.  In fact, I rather suspect that most of the companies
selling software for workstations actually have a lower profit margin
than those selling software for PC's.  (Just a guess on my part, no
data to back it up.)  Remember, too, that most workstation software
gets sold to companies buying many copies, and thus getting a quantity
discount. 

On the other hand, if you are paying your employees real money, you
will probably find that the added cost of the workstation and its
software will pay for itself in less than a year with improved
productivity.  While there may be some individual tools under DOS that
are better than the corresponding tools under Unix, the overall DOS
environment is really poor, especially if you are working as part of a
team on a network.  I say this as a user of both.
--
James Kanze                             email: kanze@us-es.sel.de
GABI Software, Sarl., 8 rue du Faisan, F-67000 Strasbourg, France
Conseils en informatique industrielle --
                   -- Beratung in industrieller Datenverarbeitung
From: dak@tabaqui.informatik.rwth-aachen.de (David Kastrup)
Newsgroups: comp.lang.c++
Subject: Re: Why is C++ not considered a true OOL?
Date: 21 Jan 93 23:58:17 GMT
Organization: Rechnerbetrieb Informatik - RWTH Aachen
Distribution: world
NNTP-Posting-Host: tabaqui.informatik.rwth-aachen.de

Simple answer: static typing.
Although you might go to pains to derive anything from a purely
virtual ancestor, the builtins won't follow suit.

You have say beforehand, what kind of variables you want to have,
because variables don't carry their types with them. It's the
compiler knowing about types, not the runtime system.

So you do not have blackboxes which might contain anything as
an object.
From: cshaver@informix.com (Craig Shaver)
Newsgroups: comp.lang.c++
Subject: Re: MI vs. SI
Date: 21 Jan 93 20:51:25 GMT
Organization: Informix Software, Inc.

In article <1993Jan21.093918.3738@fmrco.uucp> pandrews@lovat.fmrco.com writes:
>In article 18020@borland.com, pete@borland.com (Pete Becker) writes:
>> In article <93019.090854IO70620@MAINE.MAINE.EDU> <IO70620@MAINE.MAINE.EDU> writes:
...
>> >through the use of multiple inheritance.
>> 
...
>> But that sort of problem isn't limited to multiple inheritance...
>> 	-- Pete
>> 
>Totally agree. Why oh why oh why (:-)) do folks have such a downer on MI? YES, I
>suppose you can do the same stuff with SI, but thats like saying "I can get from
>A to B by walking, why drive?" (well kind of). The point is MI is USEFUL. As people
>have said before: "Use it for Mixins". There is too much design of classes that
>can't be re-used for various reasons (private not protected members, standard not
>virtual functions (esp. destructors), monolithic SI class libraries).
>
>If you want to see the best argument yet for MI, take a look at NIH (it uses SI). The
>library would have been much more useful written as a set of Mixins. Programmers could
>then decide for themselves which parts of the Object class they wanted in their
>programs. (P.S. NIH was first written prior to MI).
>
>Anyway, enough ranting for now.
>
>(Needless to say, my opinions are my own)
>
>- Paul
>
>
>---
>---
>Paul Andrews
>
>EMail				Telephone
>pandrews@lovat.fmrco.com	+44-71-975-4723

What about using delegation through class members?


-- 
Craig Shaver  (cshaver@informix.com for now) (415)390-0654 (415)926-6407
Productivity Group POB 60458 Sunnyvale, CA  94088
Newsgroups: comp.lang.c++
From: steve@taumet.com (Steve Clamage)
Subject: Re: Friend ..Overload Assignment opertr ..
Organization: TauMetric Corporation
Date: Sun, 24 Jan 1993 16:22:20 GMT

schmidt@rz.uni-passau.de (SCHMIDT GUIDO) writes:

>operator=() is something like a constructor with built in destructor. You
>can specify as many different constructors for one class as you like.
>Likewise you can do for operator=().

operator=() has nothing in common with constructors except that
	both must be member functions
	they may be overloaded
These two things are also true for other unrelated functions.

operator=() need not behave in any way like a constructor or destructor.
If such a function exists, it is invoked when a class object is assigned
to (but not when one is initialized).  The function might or might not do
any construction or destruction.  The function is not automatically
invoked by creating or destroying an object.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Newsgroups: comp.lang.c++
From: ian@syacus.acus.oz.au (Ian Joyner)
Subject: Re: Why is C++ not considered a true OOL?
Organization: ACUS Australian Centre for Unisys Software, Sydney
Date: Tue, 26 Jan 1993 01:52:19 GMT

maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:

>In article <1993Jan21.034840.11361@syacus.acus.oz.au> ian@syacus.acus.oz.au (Ian Joyner) writes:

>>A good language will 'help' you write good programs, especially where a
>>team of a number of people are concerned. OOP helps organise a project
>>somewhat, and C++'s OO features are a help in this way. However, since
>>it is based on C it is less of a help than could be desired from a
>>purer OOL.
>>
>>Some people see pure OOLs as restrictive. 

>	Especially if they favour writing some programs
>using an ADT approach rather than an OO one.

I don't see this. One definition proposed for OOP is that it approximates
to ADTs + inheritance. So many OO languages are strongly based on ADTs. I
can't see anything magic about C++ that makes it a better tool for
implementing ADTs than any other OO language.

>	C++ lack of restrictions may be seen as an advantage then.

(OK lets all program in binary, no restrictions at all ;-))

>It saves swapping languages for different types of project.
>This enables reuse of existing codes.

>	It is certainly true that if you mix your idioms
>in C++ you get a mess. However, writing consistent
>programs using one of the many styles supported by C++
>is possible, it just takes extra learning.

John's going to love me for this, but arguments defending C++, based
on ADTs and mixed idiom programming are as fatuous as the engineering
compromise argument, which was effectively dispelled last year. These
are weak arguments. Even if they were strong arguments, they could not
make up for the fact that C++ is a language based on all the faults
of C, and it therefore leaves much to be desired as an OOL, or a modern
language of any paradigm.

In summary, I think that ADTs, idioms, etc have become technical jargon
that is now being thrown around to avoid the real issues.
-- 
Ian Joyner  ACUS (Australian Centre for Unisys Software)    ian@syacus.acus.oz
"Where is the man with all the great directions?...You can't imagine it,
 how hard it is to grow, Can you imagine the order of the universe?" ABWH
Disclaimer:Opinions and comments are personal.
From: rks9954@usl.edu (Srinivasa Rao K)
Newsgroups: comp.lang.c++
Subject: Friend ..Overload Assignment opertr ..
Date: 22 Jan 93 07:53:17 GMT
Organization: University of Southwestern Louisiana


 


 Hi C++ masters,

       I have small question ...

       I am writing a "string"  class which i should be able
       to use like


       string str1;

       str1 = "Hello world" ;



       But We canot use a friend to overload the assignment oprator.

      So finally  I had to convince myself to use something like


       str1 <= "Hello world"


       which works.

      Is there any way to do the first method ....

      
      Thanks for those who spend time reading this ....




Rao.
Newsgroups: comp.lang.c++
From: johnrp@well.sf.ca.us (John Panzer)
Subject: Is Borland C++ about to support exceptions??
Organization: Whole Earth 'Lectronic Link
Date: Sat, 23 Jan 1993 02:03:58 GMT


I've recently read at least two articles in different magazines
which imply that Borland is (or will soon) support C++ exceptions.
They talked like the event might fall within their lead time.
Is this a spurious rumor, or something that everybody except me
has heard about?

John Panzer
johnrp@well.sf.ca.us
From: mmuhamad@eniac.seas.upenn.edu (Zaki Muhamad)
Newsgroups: comp.lang.c++
Subject: How to draw a histogram and graph using C++?
Date: 21 Jan 93 20:52:55 GMT
Organization: University of Pennsylvania

Hi,
    Can someone send me a copy of any C program that draws a graph or
a histogram as its output.  I currently take a class that requires me
to make such program but I really don't have any experience in drawing
any graph or histogram using C. With your help, may be I can revise
that program and get the ideas to use the C functions that have
something to do with graphing.  Also, if you happen to know any 'good'
C book explaining about graphing and making histogram, please let me
know.

Thanks.  

*******************************************************************************
Zaki Muhamad,
School of Engineering and Applied Science,
University of Pennsylvania.
e-mail add: mmuhamad@pixmap.seas.upenn.edu
*******************************************************************************

--
*******************************************************************************
Zaki Muhamad,
School of Engineering and Applied Science,
University of Pennsylvania.
From: pickerig@eee.bham.ac.uk (Guy Pickering)
Newsgroups: comp.lang.c++
Subject: Re: Was: Template Use <sigh>
Date: 22 Jan 1993 17:22:06 GMT
Organization: The University of Birmingham, England
NNTP-Posting-Host: nanda_devi.eee.bham.ac.uk
X-Newsreader: TIN [version 1.1 PL6]

Further info to my post:

  1/ I am using AT&T C++ V3.0.1
  2/ The problem lies in using archived libraries it seems.

Guy.

--
+--------------------------------+-----------------------------------------+
| Guy Pickering                  | School of Electronic & Electrical Eng,  |
| E-MAIL: G.PICKERING@uk.ac.bham | University of Birmingham,               |
| Tel: (021) 414 4340            | Edgbaston, Birmingham. B15 2TT.         |
+--------------------------------+-----------------------------------------+


Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Question About Code In ARM
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Tue, 26 Jan 1993 22:07:53 GMT

In article <DOUG.93Jan21151105@monet.ads.com> doug@monet.ads.com (Doug Morgan) writes:
>In article <1993Jan20.233819.24771@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
>   In article <1993Jan20.014738.8501@ctp.com> dchen@ctp.com (Denys Chen) writes:
>   >(In another word, can we remove ", public virtual W" ?) 
>   >                                 ^^^^^^^^^^^^^^^^^^
>
>	   Depends. The requirement "you can only initialise an
>   immediate base"...
>
>Actually, the ARM statement (pg. 290) is "Initializers for immediate
>base classes ... may be specified in the definition of a constructor."
>It doesn't come right our and say ONLY immediate base classes can be
>initialized.  
>Of course, the (supposedly superfluous) commentary seems
>to think this when it says "Disallowing the initialization of indirect
>bases...".  In any case, someone (I think it was Stephen Clamage) said
>the (quasi-implied) restriction has been tossed from the latest
>version of the proposed standard.

	Better not be tossed out: its an important restriction.

>
>Hopefully the sections on virtual base classes for the final standard
>will be heavily edited by someone with a nack for logical expression
>in English.  Those sections are really a mess in the ARM.

	Even better, the rule for virtual base initialisation
could be improved so you dont have to init every VB in the complete
object .. a real mess when you're mixing 20 VB together.


-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;------ SCIENTIFIC AND ENGINEERING SOFTWARE ---ph:  2 799 8223 --------
Newsgroups: comp.lang.c++
From: mbersohn@alchemy.chem.utoronto.ca (M. Bersohn)
Subject: When Are Global Objects with a Constructor Initialized?
Originator: mbersohn@plumbum.chem.utoronto.ca
Organization: University of Toronto Chemistry Department
Date: Mon, 25 Jan 1993 02:44:02 GMT

Hello C++ experts:
	Does anyone know when global objects of a class with
a constructor that does initializations are initialized,
at compile time or at the beginning of execution?

	 One might ask "Why care?". I intend to have
over 100,000 of such objects so I don't want to 
proceed in this way if they all have to be initialized
at the beginning of every run of the program.

	 Thank you in advance.
Malcolm Bersohn
mbersohn@alchemy.chem.utoronto.ca
P.S. I'm aware that aggregates with an initialization list
are initialized at compile time, but a constructor looks
like code that is executed.
Xref: sparky comp.lang.c++:19850 comp.sys.ibm.pc.misc:17067
From: spiegl@cs.utexas.edu (Andreas Spiegl)
Newsgroups: comp.lang.c++,comp.sys.ibm.pc.misc
Subject: BC 3.1 has DPMI error on my machine
Date: 25 Jan 1993 03:21:01 -0600
Organization: CS Dept, University of Texas at Austin
Distribution: world
NNTP-Posting-Host: paducah.cs.utexas.edu
Summary: problem with BCC 3.1 and dpmiinst.exe
Keywords: BCC,dpmi

Hi,

I have a major problem with Borland CPP 3.1:

When I run either of bc.exe, bcc.exe, cpp.exe, etc I get:
 DPMI server initialization error->machine not in database

Okay, after the first shock I read in the documentation that one
should run dpmiinst.exe in that case. I did and got the following:

 A20 was already enabled, so test is meaningless
 Cannot find method to enable A20

 DPMIINST is unable to make a conclusive analysis of this machine

I have a 286 clone with 1 MB, am running DOS 5.0 on it. I tried with
HIMEM.SYS and without, but same error message.

I am also using the HyperDisk cache. When I tried to run DPMIINST
w/o that and w/o HIMEM.SYS, it worked and updated the dpmi database.
Now I can run TD, TASM, etc, but when I try BC to get the IDE:
 Cannot load DPMIMEM.DLL
I checked: this file exists, even in the current directory (...\BIN)

Can anyone of you think of how I get that sucker to run, please?

Thanks so much in advance, I am desperate,
 Andy.
-- 

-------------------------------------------------------------------------------
Andreas (Andy) Spiegl, spiegl@cs.utexas.edu
CS Graduate Student at University of Texas at Austin
Newsgroups: comp.lang.c++