HDTenEightyP/NetNews huggingface dataset:
From: tony@scubed.com (Tony Luu)
Newsgroups: comp.lang.c++,comp.lang.c,comp.os.msdos.programmer,comp.windows.ms.programmer
Subject: Re: Poll : Microsoft support on the Internet
Date: 17 Nov 92 00:58:18 GMT
Organization: S-Cubed, San Diego California

In article <0cN7TB1w164w@csiatl.Gwinnett.COM> olga@csiatl.Gwinnett.COM (olga from the volga) writes:
>jlorimer@smaug.dvr.ppoc.com (John D. Lorimer (PPOC systems administrator)) writes:
>
>> 
>> 
>> 
>> Absolutely a vote for "Yes Microsoft support on Internet".  Internet would be
>> ideal place for Microsoft to support their products, especially Windows NT. 
>> Since I have made no plans to support Compuserve nor will I.
>
>
>YES YES YES !!! I support it also!
>
>olga@csiatl.gwinnett
>YOW!

YES, ME TOO


Tony T. Luu

--------------------------------------------------------------------

Maxwell, S-Cubed Division              Phone:  619.587.7248
P.O. Box 1620                          Fax:    619.755.0474
La Jolla,  CA  92038-1620              Internet: tony@scubed.com

--------------------------------------------------------------------
From: mccauleyba@vax1.bham.ac.uk (Brian McCauley)
Newsgroups: comp.lang.c++
Subject: Re: virtual base class and pointer to member function
Date: 23 Nov 92 19:10:17 GMT
Organization: University of Birmingham

In article <7972@charon.cwi.nl>, frans@cwi.nl (Frans Heeman) writes:
> I have a class A that stores a pointer to a member function, that
> function being defined in class A or one of its subclasses. If class B
> is derived from A, and B defines B::f(), I can store a pointer to B::f()
> in A. When I use that member function pointer with an object of type B,
     ^ Oh no you can't (unless you use a non-portable cast)
> B::f() gets invoked for that object (see code below).
> 
> However, when I specify A as a *virtual* base class of B, this no
> longer works. When I now use the member function pointer with an object
> of type B, B::f() gets invoked in the scope of A, even though A does not
> define f(). Only when I explicitly cast the type of the function back
> to (B::*)(), it gives the same result as above.
> 
> Which, if any, of the behaviors above is 'correct'?

Explicity casting pointers to functions is not safe and not portable.

A few weeks ago there was a long discussion about whether a some
implicit conversions between function pointers should be allowed but
it was concluded that even the most innocent looking conversions could
cause trouble under some implementations.

In practice...

 void (A::*fptr)() = (void (A::*)()) &B::f();
 B b;
 b.*fptr()

... will only work if A is the first base class of B and is not virtual.
However there is no obligation on the implementor to make this work.
-- 
    \\   ( )    No Bullshit!     |  Email: B.A.McCauley@bham.ac.uk   
 .  _\\__[oo        from         |  Voice: +44 21 471 3789 (home)
.__/  \\ /\@    /~)  /~[   /\/[  |    Fax: +44 21 625 2175 (work)
.  l___\\      /~~) /~~[  /   [  |  Snail: 197 Harborne Lane,
 # ll  l\\    ~~~~ ~   ~ ~    ~  |         Birmingham, B29 6SS, UK
###LL  LL\\   (Brian McCauley)   |   ICBM: 52.5N 1.9W
Newsgroups: comp.lang.c++
From: kestes@nswc-wo.nswc.navy.mil (Kent Estes)
Subject: question on REFERENCES
Organization: Naval Surface Warfare Center
Date: Tue, 17 Nov 1992 14:10:55 GMT

Hello netters,  

I am working on a function that references objects via id.  Upon finding
an object, it returns a reference to that object.  My question is :
if the object is not found, what is the best way to handle this.  If 
I were returning pointers to objects, all I would have to do is
return NULL.

tnx kl.

reply via email not encouraged.
From: kilitzir@antigone.csi.forth.gr (Xristos Kilitzirakis)
Newsgroups: comp.lang.c++
Subject: operator <</>> + streams
Date: 23 Nov 1992 16:27:52 +0200
Organization: Institute of Computer Science, FORTH Hellas
NNTP-Posting-Host: antigone.csi.forth.gr

2 simple q.s for those who have the manual near by.Mine is
100 km. away.
1)-------------------------------------------------------------
I want to specify the operators <</>> , but I want them to work
either with o/istream or i/ofstream + strstream.I think that
these derived from ios , yet I'm not quite sure.
2)------------------------------------------------------------
Suppose the following small program:
class line{ Data *p;data &operator[](int);}
class matrix(line *p;data &operator[](int){return p[i];}
                     ^^^^^^^^^^ 
Are these operators properly defined for the following listing ?
data x;
matrix f(10,10);
x = f[1][1];
f[1][1] = x;
It's a trivial question , if you know the answer.


 Any answers apart from being appreciated , can be sent to
kilitzir@csi.forth.gr
kilitzir@ics.forth.gr
kilitzir@csd.uch.gr
Date: Fri, 13 Nov 92 23:15:00 +0100
From: Gilles_Kohl@spam.fido.de (Gilles Kohl)
Subject: C++ tools/facilities for EMACS
Newsgroups: comp.lang.c++
Organization: This origin line is inoperative. Call support at 

I know about c++-mode and the C++ awareness of etags, but would be interested 
in hearing about anything that goes a bit further. Is there a c++-mode that 
offers more than the c-mode functionality in C++ sources, are there other tools 
available ?

(Browsers, maybe ? Tags with type information included ?)

Regards,
Gilles.

---
Newsgroups: comp.lang.c++
From: pjl@cs.uiuc.edu (Paul Lucas)
Subject: Re: basic question
Organization: University of Illinois at Urbana-Champaign
Date: Fri, 20 Nov 1992 20:04:05 GMT

In <GROSSJOH.92Nov20192207@petty.ls6.informatik.uni-dortmund.de> grossjoh@petty.ls6.informatik.uni-dortmund.de (Kai Grossjohann) writes:

>Hi all, 

>this has GOT to be a FAQ, but I ask anyway: Suppose I have:

>	int i;
>	for ( i=0; i<10; i++ ) {
>		cout << "Hey, you!" << endl;
>	}

>After the loop, can I _rely_ on the fact that i==10?

*****>	Yes.
-- 
	- Paul J. Lucas				University of Illinois	
	  AT&T Bell Laboratories		at Urbana-Champaign
	  Naperville, IL			pjl@cs.uiuc.edu
From: skip@taygeta.oc.nps.navy.mil (Skip Carter)
Newsgroups: comp.lang.c++
Subject: Re: 'new' syntax?
Keywords: pointer new syntax
Date: 16 Nov 92 21:42:52 GMT
Reply-To: skip@taygeta.oc.nps.navy.mil (Skip Carter)

In article <1992Nov13.095152.26819@rs6000.bham.ac.uk>, pickerig@eee.bham.ac.uk (Mr. G. Pickering) writes:
|> I want to create an array of 'size' long**, is the correct syntax:
|> 
|>   long*** new_blocks = new (long**[size]);
|> 
|> I am having memory corruption problems and suspect this is not doing
|> what I really want.
|> 

	long **new_blocks = new long *[size];

	// to allocate space that each new_block[] points to,
	for (int k = 0; k < size; k++)
		new_blocks[k] = new long[block_size];


-- 
 Everett (Skip) Carter             Phone:  408-646-3318 FAX: 408-646-2712
 Naval Postgraduate School         INTERNET: skip@taygeta.oc.nps.navy.mil
 Dept. of Oceanography, Code OC/CR  UUCP:     ...!uunet!taygeta!skip
 Monterey, CA. 93943               TELEMAIL: s.carter/omnet
Newsgroups: comp.lang.c++
From: nikki@trmphrst.demon.co.uk (Nikki Locke)
Subject: Re: C++ reference via FTP please
Reply-To: nikki@trmphrst.demon.co.uk
Distribution: world
X-Mailer: cppnews $Revision: 1.20 $
Organization: Trumphurst Ltd.
Date: Mon, 23 Nov 1992 16:42:55 +0000

In article <Nov.21.14.51.00.1992.23662@romulus.rutgers.edu> bachmann@romulus.rutgers.edu (Dan Bachmann) writes:
> could someone please send me the address/directory of an FTP site that
> has a mini-C++ reference. There must be something available out there.
Try the C++ FAQ for a start.
Many thanks to Marshall Cline for compiling and maintaining it. 

It can be obtained ...

Via ftp - Anonymous ftp from sun.soe.clarkson.edu [128.153.12.3] :pub/C++/FAQ

Via mail - send mail 
To: archive-server@sun.soe.clarkson.edu
Subject: send C++/FAQ


-- 
Nikki Locke,Trumphurst Ltd.(PC and Unix consultancy) nikki@trmphrst.demon.co.uk
trmphrst.demon.co.uk is NOT affiliated with ANY other sites at demon.co.uk.
Newsgroups: comp.lang.c++
From: igor@pccentre.msk.su (Igor Kudashev)
Subject: Please, send me FAQ. 
Organization: Korinf Co., Moscow, Russia
X-Newsreader: TIN [version 1.1 PL6]
Date: Tue, 17 Nov 1992 11:58:21 GMT

Please, send me FAQ.
Thanx in advance.
Igor V. Kudashev
E-mail: igor@pccentre.msk.su

Newsgroups: comp.lang.c++
From: mg@tyrolia (Michael Golan)
Subject: Re: New Employee Test
Organization: Princeton University, Dept. of Computer Science
Date: 19 Nov 92 01:55:29 GMT

wbader@pluto.csee.lehigh.edu (William Bader) writes:

>Where I work, we ask people to write a short program that breaks a line
>into words.

Ah, but can they use strtok() ?
From: burman@polaris.UUCP (Surendra Burman)
Newsgroups: comp.lang.c++
Subject: Linking Error)
Date: 23 Nov 92 00:31:44 GMT
Organization: Vista Technologies, Inc. Schaumburg, IL 60173 USA


 
 What is the simplest way to debug a linking error?
 I am getting a strange error of undefined symbols
 when I am trying to link some C++ files.

 e.g.
	ld: Undefined symbol
	   _XtMalloc
           _XtFree
	   _XtRealloc

There are about 25 files and I did find these symbols in 
one of the files.I get this error when I am trying to call
a constructor function. If I comment out the constructor
function, the program links fine. I tried to check the order
in which I am linking the files, but it did not help? I am
new to C++.

Any pointers in this direction will be highly appreciated.

Thanks in advance.

Please email me any suggestions.

-- Burman
Email: burman@vistatech.com 

Newsgroups: comp.lang.c++
From: hansen@giga.cs.umn.edu (David M. Hansen)
Subject: Re: Confusion on :: and protected (Simple?)
Organization: University of Minnesota
Distribution: na
Date: Fri, 20 Nov 1992 23:17:57 GMT

In article <rmartin.722274669@thor>, rmartin@thor.Rational.COM (Bob Martin) writes:
|> mike@sdd.comsat.com (Mike Stennett) writes:
|> 

[error messages deleted

|> 
|> |class foo 
|> |{
|> |protected:
|> |	static int print(const int y) { cout << y << endl; return 1;}
|> |};
|> 
|> |class  joe : public foo
|> |{
|> |public:
|> |   static int something(int z);
|> |};
|> 
|> |int joe::something(int z)
|> |{
|> |    foo::print(5);
|>      ^^^^^^^^^^^^^^^    This is the line with the error.
|> |}
|> 
|> ARM 11.5 (p253) says that member functions of derived classes can only
|> access protected members of base classes "through a pointer to,
|> reference to, or object of the derived class (or any class derived
|> from that class). 

Almost.  What it says is "A friend or member function of a derived class can
access a protected static member of a base class."

Notice that foo::print() is static.

The ARM goes on to say "A friend or member function of a derived class can 
access a protected *nonstatic* [emphasis mine] member of one of its base classes
only through a pointer to, reference to, or object of the derived class (or
any class derived from that class)."

Mr. Stennett appears to have found a bug in his compilers.

BTW, CenterLine's ObjectCenter 1.1 compiles and executes this code correctly.

|> 
|> However, you can do this:
|> 
|>     this->foo::print(5); 
|> 
|> This is allowable since you are accessing foo::print through a pointer
|> to a joe (this).  Wierd huh?

Ummm.  joe::something() is also static.  Therefore there is no 'this' available.


					-=Dave
Newsgroups: comp.lang.c++
From: steve@taumet.com (Steve Clamage)
Subject: Re: unsigned char?
Keywords: unsigned char?
Organization: TauMetric Corporation
Date: Sat, 14 Nov 1992 22:15:10 GMT

adelt@imada.ou.dk (Adel Shavandi) writes:


>I have the following code segment:

>	unsigned char	_number;
>	ifstream istrm;

>	istrm>>_number;

>in the input file to be read, i am supposed to read 15, but by
>inspection i find out that _number is 49!

The conversion for char or unsigned char reads one character from
the input, possibly first skipping leading whitespace.  If the next
input character was '1', then _number would would contain '1'.  The
ASCII code set uses the value 49 to represent the character '1'.
If you look at the value of _number as an integer, it will be 49,
although as a character it will be '1'.  Example:
    cout << "char  = " << _number << ", value = " << (int)_number << endl;
This should print
    char = 1, value = 49
(Assuming your system uses ASCII, which is usually the case.)

If the input contains a sequence of characters you want to treat as an
integer, read the value into a variable of some integer, not char, type:
	int i;
	unsigned long j;
	istrm >> i >> j;

By the way, I suggest not using leading underscores on indentifiers in
your own code.  It is a dangerous habit, as they may conflict with things
in system headers.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
From: mccauleyba@vax1.bham.ac.uk (Brian McCauley)
Newsgroups: comp.lang.c++
Subject: Re: self-reproducing C++ program
Date: 17 Nov 92 20:54:53 GMT
Organization: University of Birmingham

In article <1992Nov17.144939.21793@cc.gatech.edu>, brianm@cc.gatech.edu (Brian N. Miller) writes:
> In article <1919@alcbel.be> ldup@ta7s49.alcbel.be (Luc Duponcheel) writes:
> 
>> <<';'<<
> 
> This won't work, because character constants are converted to ints.
> This will output the ascii decimal equivalent of ';', right?
No, your thinking of C, were all talking about C++ :-)
-- 
    \\   ( )    No Bullshit!     |  Email: B.A.McCauley@bham.ac.uk   
 .  _\\__[oo        from         |  Voice: +44 21 471 3789 (home)
.__/  \\ /\@    /~)  /~[   /\/[  |    Fax: +44 21 625 2175 (work)
.  l___\\      /~~) /~~[  /   [  |  Snail: 197 Harborne Lane,
 # ll  l\\    ~~~~ ~   ~ ~    ~  |         Birmingham, B29 6SS, UK
###LL  LL\\   (Brian McCauley)   |   ICBM: 52.5N 1.9W
Newsgroups: comp.lang.c++,comp.std.c++
From: sasghm@theseus.unx.sas.com (Gary Merrill)
Subject: Re: something nasty report
Originator: sasghm@theseus.unx.sas.com
Date: Tue, 17 Nov 1992 14:59:50 GMT
Organization: SAS Institute Inc.


In article <1992Nov17.013839.20401@microsoft.com>, jimad@microsoft.com (Jim Adcock) writes:

|> isn't so who can say?]  Personally, I hate compilers that die without
|> an applicable line#, such that I have to debug by binary chop.  But, I
|> have yet to find any compiler where it is not easy to construct 
|> erroneous input such as to kill the compiler horribly.  A better measure

I would dispute the "easy" here (except as a report of your own experience
with a given set of compilers, of course).  It's pretty hard to do this
on our mainframe C compiler.  Usually what is required is some pretty
hideous source that will take advantage of chinks in the compiler's
error recovery and result in a cascade of errors.  Our testing department
is pretty devious and perverse in throwing crap at the compiler.
Still, it's *possible* to construct source that will make the compiler
barf.  We still regard the barfing as a bug.

It's been a long time since I used it, but I think the PL/I Checkout
Compiler was pretty robust.  I don't recall ever getting it to go
belly up, but it could get pretty tedious watching it try to reconstruct
an acceptable program from what you had handed it if you just left
a semi-colon off a declaration.  As in virtually everything, there
are tradeoffs here.
-- 
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: pjl@cs.uiuc.edu (Paul Lucas)
Subject: Re: Self Deletion
Organization: University of Illinois at Urbana-Champaign
Distribution: usa
Date: Sat, 21 Nov 1992 00:12:29 GMT

In <1992Nov20.221751.2482@crd.ge.com> jim@galifrey (Jim Weirich) writes:

>I am writing a windowed application using C++.  Each window is a C++
>object and interprets button presses and such through member
>functions.  When the CLOSE button is pushed, I wish to delete the
>window. The most straight forward way is have the window object delete
>itself by saying "delete this;" inside the member function handling
>the CLOSE button. This seems to work, but I wonder if it is proper to
>delete an object while executing one of its member functions.

>Work arounds obviously are possible (e.g. mark the object for
>deletion, then have another object actually do the "delete" sometime
>later), but why complicate things if self deletion is "OK".

*****>	Self-deletion is (will-be) a no-no; static members are another
	work-around.
-- 
	- Paul J. Lucas				University of Illinois	
	  AT&T Bell Laboratories		at Urbana-Champaign
	  Naperville, IL			pjl@cs.uiuc.edu
Newsgroups: comp.lang.c++,gnu.g++.help
From: lenard@mullian.ee.mu.OZ.AU (rohan james lenard)
Subject: Template question with g++/gcc
Summary: Need advise on a template question with g++/gcc
Organization: Computer Science, University of Melbourne, Australia
Date: Tue, 17 Nov 1992 13:09:01 GMT

I have a question regarding template and g++/gcc.
According to the ARM something like this should be valid -

>	template<class T,char *V> class foo
>	{
>		foo(char *filename = V) {} ;
>	}
...
>	foo<int,"Hello">	a;

However g++/gcc (2.2.2) complains pretty mightily about it.
I have tried something like this -

>	class A
>	{
>		const char *str = "Hello";
>		operator char * () const { return str; }
>	}
>	template<class T,class V> class foo
>	{
>		foo(char *filename = (char *)V) {} ;
>	}
>
>	foo<int,A>		a;

and it can be made to work, but it is not as elegant.

Does anyone have a work around so that I can use something like the first
example ? (NOTE: I may not have my code syntactically correct, as I am trying
to remember it from a few days ago at a friends work, but I assume you get the
idea)

Any help would be appreciated.

As an aside (sp?), the examples in the ARM for this sort of template class
both work - did GNU only use these or what :-) ?


Thanks in advance,
Regards,
	Rohan
--------------------------------------------------------------------------
lenard@munagin.ee.mu.OZ.AU			O O
lenard@mundil.cs.mu.OZ.AU			 |
lenard@ecr.mu.OZ.AU				\_/
--
Rohan Lenard
lenard@munagin.ee.mu.OZ.AU
lenard@mundil.cs.mu.OZ.AU
lenard@ecr.mu.OZ.AU
Newsgroups: comp.lang.c++
From: norwest@tessa (norwest)
Subject: Re: Info on IBM compatible C/C++ compiler needed!
Date: Mon, 23 Nov 1992 14:56:04 GMT
Organization: University of Iowa, Image Analysis Facility

In article <BxJ8tG.BEr@iat.holonet.net> rkinder@iat.holonet.net (Robert J. Kinder) writes:
>On the subject of IBM PC compatible C++ compilers...
>
>Check out the Glockenspiel C++ *preprocessor*, it's a front-end C++
>preprocessor for the native C compiler on your local system.  It's
>available for VAX, UNIX, OS/2, MS-DOS, and others.  
>
>It's available from ImageSoft in Port Haven, NY.  Call 1-800 directory
>assistance.  Ask about CommonView, a portable GUI C++ interface library.
>
>-- 
>// rkinder@holonet.net            International Software Solutions, Inc.  -
>// Robert J. Kinder, Jr.                             Boca Raton, Florida  -
>//                                                        1-800-788-4774  -
>//                    "No thanks!  I have a radio."


We use the glockenspiel C++ preprocesser, In my opinion it and Commonvu
are not the way to go if you want to do any serious development.
Since the C++ preprocessor relies on the C compiler you get all sorts
of nasty problems with the C compiler limitations, and the fact that
you are only getting a preprocessor.  For example
on the os2 1.3 version of Glockenspiel, the preprocessor will generate
a new block for every variable in a function, the IBM C compiler usually
chokes after x number of blocks, and the only solution is to put blocks
around every line of code.

	Also if it matters, Zortech C++ for OS2 1.3 produces code that
runs usually at least twice as fast.

	Compile times are absolutely horrendous, 2x - 4x longer than
Zortech, and IBM's C++ ( xlC ) on AIX.

	Debugging absolutely sucks, there are no debuggers that
		demangle Glockenspeil name mangling, you are stuck
		debugging the C output.

About commonvu,
	The big things to worry about are:
	1) no way to access command line arguments.
	2) The Motif version is stuck at release 2.0 levels while 
		the PC world is at 3.0+
	3) There is no working converter between PM resource files to
		Motif uil resources. ( I ended up writing one ).

Anyway,
	The mistake Norwest made in choosing Glockenspiel is that they
based the decision on the idea that it is best to use the same compiler 
on os2, windows, AIX. I'd suggest a better approach is to not worry about 
the compiler brand, but to get the best compiler for the OS you have, 
and write portable source.

It is just my opinion, and i'm sure that there are lots of people
who will disagree with me.

Alex.

Newsgroups: comp.lang.c++
From: cs000rdw@selway.umt.edu (Richard D Warner)
Subject: Looking for C++ source code to popular sort algorithms
Organization: University of Montana
Date: Sun, 15 Nov 1992 14:39:06 GMT

	I've been trying to learn C++, and it occurs to me that I should
compare what I know.  Does anyone have source code for C++ implementations
of bubblesort, mergesort, quicksort, radix sort, selectionsort, or heapsort?
It would be a lot of help to me, and speed up the learning process.  Thanks
in advance.

Rich
From: jbn@lulea.trab.se (Johan Bengtsson)
Newsgroups: comp.lang.c++
Subject: Re: How to run destructors of all objects when failure exit occurs ?
Date: 16 Nov 92 22:31:28 GMT
Organization: Telia Research AB, Aurorum 6, 951 75 Lulea, Sweden
X-Newsreader: Tin 1.1 PL4

pl2440@meibm31.cen.uiuc.edu (Paul Jay Lucas) writes:
: In <AAAsb0h8xN@inpbox.inp.nsk.su> dolgov@inpbox.inp.nsk.su (Yuri V. Dolgov) writes:
: 
: >   Often I use failure program exit when some conditions are bad.
: >The trouble is: I created some objects (e.g. dialog boxes, network connections
: >and so on) and I want to run destructors before program exit.
: >Is there exist standard technique in C++ language to solve this problem ?
: 
: 	No; only statically-allocated objects are destroyed.  Off the
: 	top of my head, *a* way to have auto-objects destroyed would be
: 	to make them register themselves with some global list of
: 	objects on construction and deregister themselves on
: 	destruction.  Now, when the global "clean-up" object gets
: 	destroyed, it could destroy all objects that are still
: 	registered.

Don't do that.  The memory occupied by those auto objects may have been
resused at this point, at least I imagine this might happen.  This is an
interesting issue; is it guaranteed that global destructors are called
while "inside" the exit call, or does this happen "after" exit() is
done?

: 	Actually, they can't be auto objects, but must instead be
: 	dynamically-allocated objects; it is illegal to delete anything
: 	not allocated by new (as auto objects aren't).

No problem.  Executing the destructors is enough, no need to
call "delete".  Using "auto" objects for these things should be
encouraged (it will be required when we finally get exceptions).

As I said above, I think it is safest to require an explicit cleanup
call before calling exit().

-- 
--------------------------------------------------------------------------
| Johan Bengtsson, Telia Research AB, Aurorum 6, S-951 75 Lulea, Sweden  |
| Johan.Bengtsson@lulea.trab.se; Voice:(+46)92075471; Fax:(+46)92075490  |
--------------------------------------------------------------------------
Newsgroups: comp.lang.c++