HDTenEightyP/NetNews huggingface dataset:
From: pjl@sparc16.cs.uiuc.edu (Paul Lucas)
Subject: Re: <stdio.h> and <iostream.h>
Organization: University of Illinois at Urbana-Champaign
Distribution: usa
Date: Thu, 3 Sep 1992 18:56:25 GMT

In <1SEP199214472267@cnsvax.uwec.edu> tannerrj@cnsvax.uwec.edu (Power = 486 + HST Dual Standard) writes:

>I am trying to put a text windowing environment on a C++ program
>that I have created. The text windowing environment is DFLAT from 
>DDJ magazine. The problem is DFLAT is ANSI C using stdio.h and
>my program is a C++ program with iostream.h. I have read that there
>are potential dangers in mixing the two. Any suggestions? Thanks.

*****>	1. You don't _have_ to use iostreams in C++.
	2. There exists a function synch_with_stdio (or something like
	   that) that makes the two work together; look at iostream.h
	   for the exact name.
-- 
	- Paul J. Lucas				University of Illinois	
	  AT&T Bell Laboratories		at Urbana-Champaign
	  Naperville, IL			pjl@cs.uiuc.edu
From: nandraj@unisql.UUCP (Nandraj Arni)
Newsgroups: comp.lang.c++
Subject: enum problem.
Date: 26 Aug 92 18:16:57 GMT
Reply-To: nandraj@unisql.UUCP (Nandraj Arni)
Organization: UniSQL, Inc., Austin, Texas, USA


   I have this problem. Two versions of GNU's compilers are
acting in different ways. Which is correct?

Example:
-------

class EnumTest {

public:
 enum varType { Apple, Orange};

 varType get_fn();

}


>>>>> The question is how to define get_fn?

One version:
-----------

varType EnumTest::get_fn()
{
...
}

Other version:
-------------

EnumType::varType EnumTest::get_fn()
{
...
}

  Neither compilers like the other definition.

-- 
*******************************************************************
Nandraj Arni

UniSQL, Inc.                           Voice: 512 343 7372 Ext. 107
9390 Research Blvd.                              Home: 512 794 9386
Kaliedo II			   	          FAX: 512 343 7383
Austin, TX 78759

Email: unisql!nandraj@cs.utexas.edu
*******************************************************************
Newsgroups: comp.lang.c++
From: sasghm@theseus.unx.sas.com (Gary Merrill)
Subject: Re: Syntactic Ambiguity Resolution in C++
Originator: sasghm@theseus.unx.sas.com
Date: Wed, 2 Sep 1992 15:33:12 GMT
Organization: SAS Institute Inc.


In fairness, I wish to point out that I just ran my ambiguity
tests on Version 3.1 of Borland C++ and it passed *all* of them.
-- 
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: J.March@lut.ac.uk
Subject: Summary: Re: Abstract Data Type libraries ?
Reply-To: J.March@lut.ac.uk (Jon March)
Organization: Loughborough University, UK.
Date: Thu, 27 Aug 92 11:46:37 GMT

>Does anyone know where I can ftp libraries of abstract data types from?
>
>I am particularly intrested in anything to do with list, tree and lattice
>implementations at the moment.

ftp from scam.berkeley.edu 
in directory /src/programming/c++
file LEDA-2.2.0.tar.Z

was the only advice that I received...

Jon March
From: mark@whizbang.wariat.org (Mark W. Schumann)
Newsgroups: comp.lang.c++
Subject: named loops 
Distribution: world
Date: Sun, 30 Aug 92 16:47:34 GMT
Organization: The Software Sweatshop, Cleveland, Ohio USA


In article <1992Aug24.161012.2835@taumet.com> steve@taumet.com writes:

!As Bjarne Stroustrup has pointed out many times, there are lots of
!proposals for lots of nice features to be added to C++.  Any one
!feature considered alone might be easy to implement, break no existing
!code, and provide some convenience for some number of programmers.
!If all such were adopted, the language would become so complicated
!that the language and its compilers would collapse under their own
!own weight.  (Some might say this has already happened :-) .)

"What he said."

When I made the jump to C++ it was with the understanding that C++
would be C with some object-oriented features added.  I did not
anticipate it becoming a mishmash of everyone's pet features.

Please, Steve, help keep it simple.

--
Mark W. Schumann/3111 Mapledale Avenue/Cleveland, Ohio 44109-2447 USA
Domain: mark@whizbang.wariat.org                      CIS: 73750,3527
"We're not nuts or anything; I mean *I'm* not nuts." <whizbang!judy>
From: warwick@cs.uq.oz.au (Warwick Allison)
Newsgroups: comp.lang.c++
Subject: Re: GOTO, was: Tiny proposal for na
Date: 3 Sep 92 23:37:39 GMT
Reply-To: warwick@cs.uq.oz.au

lwb@cs.utexas.edu (Lance W. Bledsoe) writes:
>rmartin@thor.Rational.COM (Bob Martin) writes:

>>Are you lazy?  I doubt it.  But you have decided to ignore some of the
>>lessons of the past.  

>OK, I can't stand it any more.  I don't know about the rest of you, but I'm
>getting really tired of seeing "I'm the expert, listen to me" posts from
>Bob Martin.

To negate this, I have found all of Bob's posts to be spot-on.  The last time
I used a goto was in a BASIC program in 1986.  I didn't even KNOW they were
in C until I saw some code a Fortran programmer had written (well, converted).

As for state machines, using GOTOs would have to be THE most kludgy way
of doing it.  Surely a MUCH more dynamic state machine could be built by
using a few nice classes.


I also think the "state machine" argument is a great laugh.  I wouldn't mind
betting that the proponents of that argument writing programs that are
state machines BECAUSE they use so many gotos!!!



--
Warwick
--
  _-_|\      warwick@cs.uq.oz.au            /Disclaimer:
 /     * <-- Computer Science Department,  /  
 \_.-._/     University of Queensland,    /      void (if removed)
      v      Brisbane, Australia.        /  
Newsgroups: comp.lang.c++
From: steve@taumet.com (Steve Clamage)
Subject: Re: Turbo C++, function prototypes
Organization: TauMetric Corporation
Date: Thu, 3 Sep 1992 17:15:37 GMT

harrison@lclark.edu (Mark Harrison) writes:

>In article <1992Sep2.162728.11201@taumet.com> steve@taumet.com (Steve Clamage) writes:
>>If you write, for example,
>>	void main(){ }
>>The compiler is obligated to diagnose an error in C and C++.

>But still, I have Turbo C/C++ 3.0, and my compiler is NOT obligated to
>diagnose an error.  I know because I've used 'void main()', and everything
>compiles & runs just fine.

"Obligated" does not mean "happens".  The ANSI and ISO C standards
require a diagnostic, and the ARM says it is not legal.  Any
compliler claiming conformance to standards is "obligated" to report
violations of those standards.  If a compiler does not claim
conformance, it can do whatever it likes.  Probably I should have
said "obligated by the Standard".
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
Newsgroups: comp.lang.c++
From: jonas@beppe.ericsson.se (Jonas Nygren)
Subject: Re: Garbage Collection for C++
Reply-To: jonas@beppe.ericsson.se
Organization: Ericsson Telecom AB
Date: Wed, 26 Aug 1992 12:10:40 GMT

In article 9541@microsoft.com, jimad@microsoft.com (Jim Adcock) writes:
> In article <DAVEG.92Aug20022559@synaptx.synaptics.com> daveg@synaptics.com (Dave Gillespie) writes:
> |Do you really think incremental or generational collectors are
> |feasible in C++?  I've never looked in the guts of one of these
> |collectors, but as I understand it they tend to depend on the
> |ability to move data around, and other things that a C++ collector
> |might not be able to get away with.  (C++'s use of pointers is so
> |unrestricted that it's a minor miracle it's possible to do garbage
> |collection at all...)
> 
> Generational GC is certainly feasible in C++.  In practice one needs compiler
> support for the implied "smart pointers", so that programmers don't have
> to remember to use special pointer syntax everywhere.
> 
> C++ needs to support moveable objects in any case, in order to handled
> ODBMS, persistence, locality of reference, etc.  If you ever have done
> store/restore of objects from moveable store,  you've had to handle the
> problem of moveable objects.  This is a standard programming problem not
> well handled by current C++.  It needs compiler support.  Immovable object
> GC schemes do not solve this problem -- they simply leave it to someone else
> to solve.

I believe Apples C++ supports moveable objects. If I am correct pointers in this
C++ are really pointers to handles which in their turn points to the objects
current location. This would imply that each dereference in user code p->x
would be translated by the compiler into (*p)->x.

Does anybody know if Apple's C++ works this way? If so, how do they handle
pointers to objects on the stack.

/jonas


Newsgroups: comp.lang.c++
From: leonard@cs.utwente.nl (Leonard Thierry)
Subject: Wanted: Matrix/Vector Cclass
Keywords: C++, matrix, vector, public domain
Organization: University of Twente, Dept. of Computer Science
Date: Mon, 31 Aug 1992 13:08:14 GMT


For an implementation of a simple neural net in C++ I would
like to use a class that defines matrices and matrix-operators like
addition, substraction, matrix multiplication and scalar multiplication.

I (most probably) will need floating point matrices, but a variable
typed matrix class would be better.

Does anyone know whether there exists such a class in some public 
domain software library?

Thanks in advance for any help!


Leonard Thierry
 
=======================================================================
|    Leonard Thierry    | Computer Science Dep.|  Research keywords:  |
| leonard@cs.utwente.nl | University of Twente | nat.lang.;neur.nets; |
|                       |     Netherlands      | know.rep.;logics;c++ |
=======================================================================
From: chandra@bongoaisg.com (Periannan Chandrasekaran)
Subject: C++ Product List - Version 2.03 - PART 1/5
Reply-To: chandra@bongoaisg.com (Periannan Chandrasekaran)
Organization: Accura Innovative Services Inc.
Date: Tue, 25 Aug 92 21:23:32 GMT


This is the Revised version of the C++ Product List. It contains
information about various free and Commercial products and also
some information about the User's experience of the product.

While the technical information of the products have been
collected from the individual manufacturers, user's feedback
included are not from the manufacturers! Every attempt is made to
make the document as flawless as possible but we cannot guarantee
100% reliability.

The problem of maintaining such a list is that information becomes
old very fast and continuous update is necessary. Please feel free
to e-mail any changes which you might think right. Also if you have
worked with any of the products you may email your experience to me.
Also please let me know if you don't want your name to be put along
with the user's feedback.

This list will be available in various formats ( ascii, troff,
texinfo, info, dvi, ps ) via anonymous ftp from 

ftp.th-darmstadt.de from Directory 
/pub/programming/languages/C++/c++-products

If you have problems connecting to the ftp server please send me a note
and I will e-mail. The ASCII format of the document will be posted to
the newsgroup comp.c++.lang once in a while ( possibly once in a month!).

Please send all your feedbacks to skdutta@photon.tamu.edu
From: lwb@cs.utexas.edu (Lance W. Bledsoe)
Newsgroups: comp.lang.c++
Subject: Re: GOTO, was: Tiny proposal for na
Date: 3 Sep 1992 07:59:12 -0500
Organization: U Texas Dept of Computer Sciences, Austin TX
NNTP-Posting-Host: cs.utexas.edu

In article <rmartin.715447981@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
>Are you lazy?  I doubt it.  But you have decided to ignore some of the
>lessons of the past.  

OK, I can't stand it any more.  I don't know about the rest of you, but I'm
getting really tired of seeing "I'm the expert, listen to me" posts from
Bob Martin.  He reminds me of the guy from Saturday Night Live, Al Franken...

"Gee, I might want to use a GOTO here, perhaps I better ask, Bob Martin."

"Boy, this looks like a tough problem, I wonder what, Bob Martin, would do?"

"Wow, the new ANSI C draft is out, what does, Bob Martin, think about it?"

As a C, C++, OOP consultant specializing in embedded systems, I use GOTOs
now and then.  Hey nucklehead, GOTO is in the language because it has a
place!  Try writing a state machine without one!  ...You can, but it takes
about 5x the code, and is alot more confusing.

Now let's see, where did I put that "kill file"...

Lance

-- 
+------------------------------------------------------------------------+
|  Lance W. Bledsoe          lwb@cs.utexas.edu           (512) 258-0112  |
|  "How did the Scarecrow know he didn't have a brain?"                  |
+------------------------------------------------------------------------+
From: maas@dutiws.tudelft.nl (Frank Maas)
Newsgroups: comp.lang.c++
Subject: Re: Borland C++ 3.1 - Microsoft C++ 7.0
Date: 28 Aug 92 22:37:34 GMT
Organization: Delft University of Technology

X-You_ve_seen_this: This is a repost due to mailer and news problems

Hello all,

The subject says it all really. For a project I have to port a piece of Borland
code to Microsoft and it seems there are some differences. My question is: which
differences and how to convert it.
There must be some literature on this, but my company couldn't find it.

So my questions: * what are the differences between Borland and Microsoft
		 * who has done such a port and has some good tips
		 * who knows about literature on this

You can e-mail me with your answers, I will post a summary.

Thanks,

Frank Maas (e-mail:maas@dutiws.twi.tudelft.nl)
From: rgp@mpd.tandem.com (Ramon Pantin)
Newsgroups: comp.lang.c++
Subject: Re: GOTO, was: Tiny proposal for na
Date: 3 Sep 92 19:27:32 GMT
Organization: Tandem Computers, Micro-Products Division

In article <rmartin.715526582@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
>potts@itl.itd.umich.edu (Paul Potts) writes:
>
>|To make GOTO more readable, NEVER go backwards in your code, only
>|forwards; use only one GOTO in a block, and comment explicitly. If GOTO
>|is used only under certain conditions, the argument against writing
>|spaghetti code really doesn't apply.

>You don't have to make up your own rules. Some other guys, who have
>thought about it alot, have put together a pretty well thought through
>set of rules.

Robert Martin means:
	"Don' think.  Others have already thought about it for you (and me),
	 please don't use your brain, it might hurt."

Paul, you better start listening to the "expert", Robert Martin, he is
talking about the highest religious experience of them all, Structured
Programming (SP).

>...  Moreover, the industry has, for the most part, accepted
>those rules as valid.

So if that is the case, then we have to blame all mighty SP for the 100 x 1
or 1000 x 1 defect ratios (that the expert, Robert Martin, reported) in code
"made in the U.S.A." vs code "made in Japan" ?

Hope that this doesn't cause another series on "Structured Programming
and the Software Crisis" by the expert, Robert Martin.

>...  Moreover, it has been proven that those rules
>are always workable, and it has been shown that they help to make code
>more readable and maintainable.  

Paul, the expert says that it has been PROVEN !!!
I think that the proof method is "reduction to ad-nauseum", some of the
techniques used in the proof are "kill files" and "reduction of the
audience to the empty set", this appeared recently in a series of posts
in comp.lang.c++, to be published by the expert, Robert Martin as the:

	"Power User's Guide to Structured Programming in C++,
		Theorems and Formal Proofs

Robert, I'm another one that is sick and tired of this constant and useless
repetition.  Why don't you spare us from your priceless words of wisdom
and just molest a smaller group of people thru direct email?

If you can't resist some internal need for communicating in broadcast
mode (exhibitionism? :-) about this topic, I sugest that you set up a
mail alias and that all the people interested in this topic send you
their mail addresses to set it up (just imagine your own mini-newsgroup!),
just don't be disappointed if nobody signs up.

Ramon Pantin
Newsgroups: comp.lang.c++
From: fjh@mundil.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: LONG class wanted
Organization: Computer Science, University of Melbourne, Australia
Date: Wed, 2 Sep 1992 08:01:37 GMT

holland@dutiws.tudelft.nl (Gerhard den Hollander) writes:

>I am thinkling of creating a class which can handle arbitrary large numbers
>(whether integers of reals, and I'm thinking of numbers with >100 digits )

libg++ contains an arbitrary-precision integers class.
I'm not quite sure exactly what your requirements are with regard to
reals - pi has a lot of digits, last time I counted ;-) - but
libg++ also includes an arbitrary-precision rational number class.

-- 
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!
From: hendrik@vedge.UUCP (Hendrik Boom)
Newsgroups: comp.lang.c++
Subject: Re: named loops
Date: 28 Aug 92 16:29:12 GMT
Organization: Visual Edge Software, St. Laurent, Quebec

rae@Alias.com (Reid Ellis) writes:
: Arlie Davis <aldavi01@starbase.spd.louisville.edu> writes:
: |for main_loop (...)
: |  // ...
: |  for inner_loop (...)
: |    // ... complex mess of loops ...
: |          break main_loop;       // somewhere deep inside the loops
: |    // ...
: |          continue inner_loop;   // similarly, deep inside loops
: 
: How about an int argument to "break", as supported in many scripting
: languages?  Add a similar argument to "continue" while we're at it.
: Then you can do things like this:
: 
: for(...) { // loop outer
:     for(...) { // loop middle
:         for(...) { // loop inner
: 
:             break; // breaks out of inner
: 
:             break 2; // breaks out of middle
: 
:             continue 2; // continues middle
:         } // loop 3
:     } // loop 2
: } // loop 1
: 
: An argument of zero or one would cause the current, default behaviour.
: Just a thought...
: 
Isn't this just what goto's were made for?
From: mothra@unixhub.SLAC.Stanford.EDU (Rand Phillip Pendleton)
Newsgroups: comp.lang.c++
Subject: bizarre error and help wanted on running TDebugger for Windows
Date: 26 Aug 92 16:14:10 GMT
Organization: Stanford Linear Accelerator Center

Well I have just had one of the strangest errors..  The only change I made 
to my file from last
night to tonight is changing the message in a SendMessage from
WM_PAINT to WM_FIRST + WM_PAINT, and now my Borland C++ OWL program
bombs with a "floating point error, square root of a negative number."
Funny thing is I am not using the sqrt function anywhere in my source
code.  It does this when it tries to create a window, not even close
to were my SendMessage call is.  Of course I can't run the debugger
as my screen gets all fouled up.  So now it is time to get that problem
problem fixed.
  This morning, I tried calling borland but did not get through.
However I was able to download a patch file tdebug.dll from their bulletin
board.  My question is whether I should use this patch file; it is dated
4/92 whereas I have the latest ( I think ) upgrade for the AppWorks 3.1, which
has a tdebug.dll in the /bin directory dated 6/92.  I have a Trident chip set
on my SVGA card and cannot run Turbo Debugger without my Windows screen
getting all fouled up with horizontal lines.  Any suggestions??
From: tostan@bert.lerc.nasa.gov (Stan Mohler)
Newsgroups: comp.lang.c++
Subject: ENCRYPTION OF DATA FILE ACCESSED BY MY C++ PROGRAM
Date: 23 Aug 92 16:51:30 GMT
Organization: NASA Lewis Research Center [Cleveland, Ohio]


Hello Turbo C++ programmers.  I'm just learning C/C++, teaching myself on my
PC with Turbo C++.  I want to write a program that reads a big data file,
which I plan to create, and uses the info.  The data file will be very large,
and will be contained on the disk with the program. 

But: when I sell this program, I don't want the buyer to be able to access 
the accompanying data file's information EXCEPT through MY PROGRAM.  

It will take alot of effort to create this file.
I want some way of encrypting it so that my C++ program can read it, decrypt
the sentences in there, and display them in plain English.  Any ideas on
how to do this?  I though of making up my own "ascii codes", and storing the
characters as binary numbers decipherable by my own inveted table.  But I
think that might be too easy to decrypt.  Any thoughts?  Thanks.  Note: I
would also like to store images in some manner that no other program will be
able to recreate the images but mine.  Any thoughts on that, too?
 
NOTE: OBVIOUSLY it will be possible for SOMEONE to decrypt the file.  Please
don't waste my time telling me not the bother!  My objective is the MINIMIZE
the ease of decryption, not make it impossible.  

-- 

-----------------------------------------------------------------------------
Stan Mohler			|     phone: 216-826-6629
NASA Lewis Research Center     	|    
Cleveland, Ohio  44135         	|     email: tostan@bert.lerc.nasa.gov 
-----------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: moharil@cs.iastate.edu (Vinay Arvind Moharil)
Subject: Problem with CC 3.0
Organization: Iowa State University, Ames IA
Date: Tue, 1 Sep 1992 03:27:45 GMT

Hi Netters!
I am new to the world of C++. I am trying to use the CC 3.0 for Sun SPARC.
Here is the code in C and C++. The code in C can be compiled with the C 
compiler happily without any problems. However when I try to compile the
C++ code using CC 3.0 I get lot of errors in the files like sys/stat.h,
X11/Intrinsic.h. I did the extern "C" ... part because some one suggested that
as a solution to get rid of the syntax errors (in the X11/Intrinsic.h file) I 
was facing. In my opinion, The CC 3.0 should compile the #include portion as a 
C code and should not give errors as is the case with the C compiler.

Please HELP!
Thanks
bye
vinay

main(argc,argv)
int argc;
char *argv[];
{
#include <X11/Intrinsic.h>
#include <stdio.h>
typedef char *String1;
String1 xyz;
printf("Hi!\n");
}

main(argc,argv)
int argc;
char *argv[];
{
extern "C" {
#include <X11/Intrinsic.h>
#include <stdio.h>
}
typedef char *String1;
String1 xyz;
printf("Hi!\n");
}
From: pete@genghis.borland.com (Pete Becker)
Newsgroups: comp.lang.c++
Subject: Re: Inherited nested classes?
Date: 31 Aug 92 18:07:02 GMT
Organization: Borland International
Originator: pete@genghis.borland.com

In article <1894@acf5.NYU.EDU> checker@acf5.NYU.EDU (checker) writes:
>jbn@lulea.trab.se (Johan Bengtsson) writes:
>>Are private nested types useful at all, given the current language definition?
>
>Huh?  How else would you have the access control work?  Of course they
>are useful:
>
>class list
>{
>public:
>	// ...
>private:
>	class list_node
>	{
>		// ...
>	}
>
>	list_node *pHead;
>};
>
>Chris

	This example omits the most interesting part: members of list_node that
try to use the name 'list_node'.  Since it's private in list, and list_node is
not a member function of list, members of list_node cannot access the name
list_node.  Which makes almnost all useful code illegal.  But that's clearly
a flaw in the wording, and not the intention of the language.
	-- Pete