HDTenEightyP/NetNews huggingface dataset:
From: mxb8@po.CWRU.Edu (Matthew Bakaitis)
Newsgroups: comp.lang.c++,comp.lang.c,comp.msdos.programmer,rec.games.programmer
Subject: (no subject given)
Date: 9 Oct 1992 03:20:52 GMT
Organization: Case Western Reserve University, Cleveland, Ohio (USA)
NNTP-Posting-Host: slc12.ins.cwru.edu


Subject: Extended Mem use on IBM clones using C/C++
Reply-To: mxb8@po.CWRU.Edu (Matthew Bakaitis)
Organization: Case Western Reserve University, Cleveland, OH (USA)

	Currently, I'm using an IBM clone with 8 meg of extended memory
to do some statistical analysis for some (boring) classes...I decided to
try to use a big sample size, but naturally ran into a problem with making
my arrays larger than allowed than the Turbo C++ 1.0 compiler I'm using.
	I tried to use the command _OvrInitEms and _OvrInitExt given in
the library reference manuals, but I couldn't get either of them to work.

So, two things:

1)  Are there any books out there that are specifically aimed at programming
	in C/C++ that deal with using this memory?
2)  Are the library functions given in the Borland manuals not the thing to
	use?  Are there better PD libraries to use?  etc.

	Notes:
	I am a decent programmer, but it is not my true vocation it seems.
I am competent in programming in T-C++ for an IBM, but that's about the
limit of it.  I _am_ pretty good at this little niche, however.
	I am crossposting this to a few groups, so take note.  The post
is to rec.games.programmer thanks to a note I read about a PBM game that
had four million planets in it.  I figured that equaled either an incredible
amount of disk access (that I would like to avoid) or some hefty memory
use...

Thanks,
Matt

-- 
Matt Bakaitis
mxb8@po.cwru.edu
From: wilkins@cs.cofc.edu (James B. Wilkinson)
Newsgroups: comp.lang.c++
Subject: Re: Will someone look at a problem and help us?
Date: 8 Oct 92 23:10:31 GMT
Organization: The College of Charleston
X-Xxdate: Thu, 8 Oct 92 19:12:42 GMT
X-Useragent: Nuntius v1.1.1d12

In article <1992Oct7.184411.17382@usceast.cs.scarolina.edu> James B.
Wilkinson, wilkins@cs.cofc.edu writes:
A number of people have responded to this request for help.  The problem
is
not yet resolved because the student didn't leave enough of the code in
the
message he sent me.  Anyway, it is being looked at, and I have a number of
backup gurus lined up if necessary.

Many thanks to all of you who responded.
-------------------------------------------------------------
Jimmy Wilkinson            | Professor of Computer Science
wilkins@cs.cofc.edu       | The College of Charleston
(803) 792-8160             | Charleston      SC        29424
Newsgroups: comp.lang.c++
From: euamts@eua.ericsson.se (Mats Henricson)
Subject: New Format and small Errata: Ellemtel Coding Standard
Reply-To: euamts@eua.ericsson.se
Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
Date: Fri, 9 Oct 1992 08:45:33 GMT

Hi!

New Format:
----------
Thanks to adc@tardis.cl.msu.edu I now have a version of our C++ Coding
Standard "Programming in C++, Rules and Recommendations" formatted for
the US Letter format. I cannot guarrantee that all references in the
document (with page numbers and so) are valid any longer, since this
version has more pages.

At the directory ~ftp/pub/eua/c++ you can now find:

-rw-rw-r--  1      36576 Oct  8 14:44 Except.ps.Z
-rw-rw-r--  1        202 Apr 29 09:17 rules.README
-rw-rw-r--  1     190683 Oct  8 14:44 rules.US.mif.Z
-rw-rw-r--  1     126848 Oct  8 14:44 rules.US.ps.Z
-rw-rw-r--  1      52327 May 20 17:26 rules.ascii.Z
-rw-rw-r--  1     191823 May 20 17:26 rules.mif.Z
-rw-r--r--  1     128859 Apr 29 09:13 rules.ps.Z

Attached far below is a detailed description of how to get the
rules.ps.Z document (the other documents are, of course, fetched in
the same way).

The document Except.ps.Z written by Johan Bengtsson in Lulea, Sweden,
has had a small change to print properly.

Errata:
------
At the moment, we don't have the manpower to make a new version of
the document. The more you read through the stuff you have had
"published", the more you shake your head. I have lots and lots and
lots of comments from helpful people around the globe I'd like to
melt into the document, but, no time for a project like that now.

Just one thing: on page 82 we have a reference to an article by
Meyers and Lejter called "Automatic Detection of C++ Programming Errors:
Initial Thoughts on a lint++". Unless you haven't noticed, Meyers have
had a book published called "Effective C++, 50 Specific Ways to Improve
Your Programs and Designs", Addison-Wesley, 1992,  ISBN 0-201-56364-9.
It's a much better reference than the article mentioned above.

Best regards,

Mats Henricson
Ellemtel
Stockholm
Sweden

============================================================================
The document was written using FrameMaker, but has been saved in Postscript
and compressed. It can be accessed by anonymous ftp from our server:
   euagate.eua.ericsson.se   (Internet Address: 134.138.134.16)
It is in the directory:
   ~ftp/pub/eua/c++
The file is ~126k large and its name is:
   rules.ps.Z
   
If there are any problems in accessing or printing the file, please contact
us at:
   mats.henricson@eua.ericsson.se

All comments are welcome. Especially if you find any bugs or
misunderstandings from our side. Please make it clear which version
you have comments on, i.e. if you have comments on this version
state "Version C in English" somewhere.

Erik Nyquist
Mats Henricson

Ellemtel
Box 1505
125 25 Alvsjo
Sweden
From: joec@cybernet.cse.fau.edu (joseph cossette)
Newsgroups: comp.lang.c++
Subject: Re: Question for Borland c++ experts
Date: 15 Oct 92 05:20:43 GMT
Organization: Cybernet BBS, Boca Raton, Florida

lalford@fsu1.cc.fsu.edu (LYNN ALFORD) writes:

> Eventually, I hope to install a full version of the Borland C++ package but 
> for the moment, I am trying to install just a very basic and small set
> of options.  My problem isn't hard disk space at the moment, after the 
> installation, there is still 7 megabytes on the hard disk.  The problem is 
> the DPMI part.  I just want to be able to play with the system for a bit 
> on a Toshiba T1000xe with 8086 processor.  It has the 640 K of conventional 
> memory needed, but will 1 megabyte of expanded memory allow the DPMI to 
> operate or does it have to be extended memory (as mentioned in the Installing
> and Configuring guide)?  Frustrating to be able to have the files needed 
> on the little computer and still not be able to use the programs.
> 
> It seems that buying expanded memory for this machine is possible, but not 
> extended memory.
> 
> Lynn

You need extended memory for DPMI. That requires at least a 286' or 
better.
From: checker@acf5.NYU.EDU (checker)
Newsgroups: comp.lang.c++
Subject: Re: vsprintf vs. incore-formating: philosophy
Date: 7 Oct 92 23:36:36 GMT
Organization: New York University

ric@updike.sri.com (Richard Steinberger) writes:
>	Can anyone provide some advice on whether to use vsprintf() in 
>a C++ program?

Do you need to interface to code that uses stdarg.h, or do you simply
want a way of doing incore formatting?  strstreams do the latter quite
well, where `well' is defined as typesafe, intuitive, less error-prone,
etc.

Chris
From: kumagic@kuhub.cc.ukans.edu (Stephen R. Figgins)
Newsgroups: comp.lang.c++
Subject: The Waite Group's new C++ book.
Date: 14 Oct 92 21:48:03 CDT
Organization: University of Kansas Academic Computing Services

I just picked up a new book today.  Object-Oriented Programming in
Turbo C++ by Robert Lafore.  It is published by The Waite Group.  

Lafore also has a book out on Microsoft C++ which is about the twin of
the book I bought.  I got it because it looked really simple.

I understand there is a variety of people out there reading this
group, so I thought I would suggest a book for all those Newbies out
there like my self.  I have found it difficult to grasp the concepts
of OOP and I wanted something simple that spoke on my level.  I
haven't had a great deal of programming experience and it seems every
book I have picked up so far has started with about three or four
chapters for simpletons, and then jumped immediately into the deep
water.  I never felt like I could keep my head up, and reading the C++
programmers guide has been like reading the technical journals of an
engineering project, it has given me no insight into the mechanics of
OOPS, and especially the mechanics of Borland's C++.

Okay, I have only read the first chapter, but I feel pretty good about
that, it explains the reason for developing object oriented programs
in the clearest manner I have yet encountered.   The illustrations are
nicely done, and not cartoony or silly.  Lafore takes a real
educational stance.  He gently instructs you in what you need to know,
and doesn't weigh you down with stuff you don't need to know.

If anyone has read this book, I would appreciate your reaction.  If
encouraged, I will keep you posted on my progress.  Happy programming.

-- 
___________________________________________________________________________

Stephen R. Figgins           |  There was an old woman
kumagic@kuhub.cc.ukans.edu   |  Who lived under the hill 
PO Box 1244                  |  And if she's not gone 
Lawrence, KS 66044	     |  She lives there still
___________________________________________________________________________
 
Newsgroups: comp.lang.c++
From: davisonj@en.ecn.purdue.edu (John M Davison)
Subject: Re: streams
Followup-To: comp.lang.c++
Summary: here's a suggestion
Keywords: C++ stream iostream strstream fstream
Organization: Purdue University Engineering Computer Network
Date: Fri, 16 Oct 92 23:47:19 GMT

        Here is one solution to the cout/cin redirection issue.  It requires
referring not to cin and cout, but rather "out" and "in", which are macros that
are expressions of type ostream and istream.

        I think that this program is simpler than Bill Button's, but I don't
have an opinion regarding whether it is better or not.  On the contrary,
observations and suggestions regarding the advantages and limitations of this
approach are encouraged (please send electronic mail if possible).

--------------------------------------------------------------------------
// Program by John Davison, davisonj@ecn.purdue.edu
// written on Friday, October 16, 1992
//
//
// This program copies
//
// { cin to cout                              , argc = 1
// { cin to the named file                    , argc = 2
// { first named file to the second named file, argc = 3
//
//
//         Note that the resulting file is always going to have a LF at the end
// of it regardless of whether the input file was terminated with a LF or not.
//
//
// Examples:
// % a.out
// % a.out to
// % a.out from to
//

#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
#include <string.h>

// My <stdlib.h> doesn't know what EXIT_SUCCESS is
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0     /* for POSIX, anyway */
#endif /* EXIT_SUCCESS */

// Here's the trick...
#define out (*out_ptr)
#define in (*in_ptr)

#define out_isa_file (argc >= 2)
#define in_isa_file  (argc == 3)

// string buffer
#define SCRATCH_BUFSIZ 512
char scratch_buf[SCRATCH_BUFSIZ];




main(int argc, char **argv)
{
    ostream *out_ptr;
    istream *in_ptr;

    if (in_isa_file)    in_ptr = new ifstream(argv[1]);          // first arg
    else                in_ptr = &cin;

    if (out_isa_file)   out_ptr = new ofstream(argv[argc - 1]);  // last arg
    else                out_ptr = &cout;

    // Copy in to out
    while (in.getline(scratch_buf, SCRATCH_BUFSIZ))
            out << scratch_buf << endl;   // LF gets tacked on, even at the end

    // Clean up if necessary
    if (in_isa_file)  delete in_ptr;
    if (out_isa_file) delete out_ptr;

    return EXIT_SUCCESS;
}
--------------------------------------------------------------------------


-- 
John Davison
davisonj@ecn.purdue.edu
Newsgroups: comp.lang.c++
From: holerbch@phoenix.Princeton.EDU (Uwe Hollerbach)
Subject: Problem with GCC, or wild pointer
Summary: But I don't know which
Originator: news@nimaster
Organization: Princeton University
Date: Wed, 14 Oct 1992 05:16:43 GMT


G'day, net.wise.ones!
	I have a question for you all. I am learning C++, and to do so
I am writing some small ode-solver classes (numerical analysis is my
field). I have a class which implements some basic operations on 1D
spectral elements, and then I have another class which builds a
Helmholtz ODE solver on top of the spectral element class. I originally
wrote it on my PC at home, using Turbo C++ version 1.0. It worked
nicely, with nice convergence to the true answer. Then I moved the
code to an Iris at the university, where after some trials I figured
out what magic incantations to invoke to get gcc (version 2.2.1, I
think) to run properly. I ran my test cases, and the spectral element
class again worked fine. Next I tried the Helmholtz ODE solver, and it
crashed -- it gave me a bus error the second time through a particular
memory allocation. I stared at the code a lot[%], and found that I was
(I think) freeing some memory incorrectly: I had
	wk = new complex[NRP*NRP];
and then
	delete wk;
which I changed to
	delete [] wk;
after reading in my copy of Lippman's C++ Primer. That did change the
run-time behavior; it no longer crashed, but it did not give me
anything like the right answers. Instead of errors of order 1
initially, decreasing to 1.e-13 or so, I got very large values, about
2.e9, if memory serves. So far this all seemed pretty clear; I thought
there must be a wild pointer somewhere screwing things up. But. At the
point marked [%] above, I thought, how does it run on other machines?
I thought I had written it correctly, so I was unhappy with the vote
of no confidence from gcc. I compiled it with the C++ compiler from
SGI (a cfront derivative, I think; I don't know the version) and it
worked perfectly; exactly the same answers as from my PC. So then I
got curious and compiled and ran it on a Sparcstation (this compiler
was again gcc 2.2.1); same perfect answers. My last trial came on an
IBM RS/6000, using their xlC compiler. Again, correct answers. At this
point I am confused. Have I found a bug in gcc 2.2.1 for Iris? I hope
not, but how can I tell? If it's not a bug in gcc, how can I debug my
code? Is there anything like Conor Cahill's debugging malloc library
available? I don't want to post my code, as it is a bit long, but I
would be most grateful for any help you can give me. If you have
any suggestions, could you please email me as well as (or instead of)
posting? I am woefully behind in my reading of this newsgroup. Thanks
very much in advance!
-- 
Uwe Hollerbach          uh@acm.princeton.edu  or  uh@alumni.caltech.edu
"In His infinite mercy, Allah does not subtract from one's alloted span those
hours which are spent in contemplation of net.news. All praise be to Allah."
-- an obscure commentator on the early work of Al-Khowariszmi
Newsgroups: comp.lang.c++
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: My objects are too big - why?
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Wed, 14 Oct 1992 11:12:51 GMT

In article <718943376snx@trmphrst.demon.co.uk> nikki@trmphrst.demon.co.uk (Nikki Locke) writes:
>
>In article <23858@alice.att.com> bs@alice.att.com (Bjarne Stroustrup) writes:
>
>> 	The reason abstract classes are underused in C++ (in my opinion)
>> 	is not implementation problems, but ignorance about their uses and
>> 	overuse of hierarchies based on ``universal'' classes.
>Another reason is that at least two of the most popular MsDOS-based C++ 
>compilers do not implement them properly, so that mixins do not work 
>correctly.
>
>Unfortunately (?) more than half the C++ programmers in existence use 
>these DOS based compilers.

	You are being unfair to the DOS compilers. MSC gets it right,
whereas CFRONT is also wrong here. I guess most of the UNIX compilers
are also flawed. (I believe the HP product works).

-- 
;----------------------------------------------------------------------
        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: kpt@fig.citib.com (Kevin P. Tyson)
Subject: Re: Distributed C++ System
Organization: IISA
Date: Wed, 14 Oct 1992 19:10:01 GMT

In article <13472@ztivax.UUCP> champ@ztivax.UUCP (Manfred Vorwalter) writes:
>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. 
>

A recent announcement from Transarc at Unix Expo covers most of the
bases you mentioned.  I don't know what your time frame is but if
memory serves they will be delivering most of what you asked for
sometime in 1993.  They can be reached at (412)338-4400 here in the
US.

Best regards,

-- 
Kevin P. Tyson		Phone:  212-657-5928	Fax:    212-657-4599
E-Mail: Kevin_Tyson@fig.citib.com or kpt@iisa.com
From: Ralph.Melton@f1.n100.z60.wlink.nl (Ralph Melton)
Newsgroups: comp.lang.c++
Subject: Profiling with g++?
Date: Tue, 13 Oct 1992 06:41:55 -0100

Organization: CS Department, Stanford University, California, USA

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)

Newsgroups: comp.lang.c++
From: arthur@solomon.technet.sg (Arthur Sombrito)
Subject: friend declaration scope
Organization: National University of Singapore
X-Newsreader: TIN [version 1.1 PL6]
Date: Wed, 7 Oct 1992 09:46:17 GMT



--


Hi,

I'd like to ask some rules regarding the scope of a friend declaration
which are not discussed (as far as I could tell) in the ARM.  
Given the ff. code:

  class B { protected : enum A {}; };
  class C : public B {
    friend class A;   // According to the scoping rules, A refers to B::A.
                      // Since B::A is not a class, should we flag an error
                      // or do we declare a new class A since there is no
                      // existing type symbol in the scope of class C?
  };

Thanks for any replies.



Newsgroups: comp.lang.c++
From: nikki@trmphrst.demon.co.uk (Nikki Locke)
ReplyTo: nikki@trmphrst.demon.co.uk
Subject: Re: static reference
Distribution: world
X-Mailer: cppnews $Revision: 1.19 $
Organization: Trumphurst Ltd.
Date: Tue, 6 Oct 1992 20:09:23 +0000


In article <1310@datmuc.UUCP> vincent@datmuc.UUCP (vincent) writes:

> 
> class a {
> 	static a *sap;
> 	static a &sar;
> public:
> //	a () { if (sar == 0) init_stuff };
What is the meaning of "(sar == 0)" ?

If you wrote ...
a foo;

if(foo == 0)
What would that mean ? 
> };
> 
> a *a::sap;
> a &a::sar;
> 
> 
> Ok what of that?
> 
> MC cl complains about 'sar' having to refere to something. Fine I want it
> initialize to zero. 
A reference is unlike a pointer in two respects.
1) A reference ALWAYS refers to the same object. You can use a pointer to 
point to one object, then later point to another one.
2) A pointer can point to nothing at all (pointer == 0), a reference 
cannot.

> I had a list of stuff with a static head pointer, It works fine but after
> reading 'Effective C++' I started to use reference more and more.
Unless your head pointer always points to the same object (i.e. you have a
list/tree/whatever whose first element is always the same), you can't use 
a reference.
---
Nikki Locke              |                        | nikki@trmphrst.demon.co.uk
Trumphurst Ltd.          | Tel: +44 (0)691-670318 | nikki@cix.compulink.co.uk
PC and Unix consultancy  | Fax: +44 (0)691-670316 | nikki@kewill.co.uk
trmphrst.demon.co.uk is NOT affiliated with ANY other sites at demon.co.uk.
Demon.co.uk is a dial-up subscription access point to the Internet.
Newsgroups: comp.lang.c++
From: btptan@solomon.technet.sg (Benjamin T.P. Tan)
Subject: TV + PE + PL286 = : -(
Organization: National University of Singapore
X-Newsreader: TIN [version 1.1 PL6]
Date: Thu, 15 Oct 1992 00:45:15 GMT



I am writing an application which uses the Turbo Vision (TV) and Paradox
Engine 2.0 library in C++. I need to have as much memory as possible for the
application. Since Phar Lap's 286|DOS Extender comes free with BC++3.1, I
tried using it for developing the application.

I was able to successfully compile and link my application with BCC286 and
TLINK, but received a General Protection Fault, with ErrorCode 0000 when I
try to run the program made.

What are the changes that I need to make to Turbo Vision and/or the C runtime
library sources in order for me to the application that uses the Phar Lap
286|DOS Extender, Turbo Vision and Paradox Engine 2.0 work?


--
****************************************************************************
*	Sysop of			    *				   *
*	 The Controversy, BBS		    *	Internet Address	   *
*	 (65)560-6040 [HST/v.32bis/v.42bis] *	<btptan@solomon.technet.sg *
*	 FidoNet 6:600/201		    *				   *
****************************************************************************
Newsgroups: comp.lang.c++