HDTenEightyP/NetNews huggingface dataset:
From: lam@saifr00.cfsat.honeywell.com (Josh Lam)
Newsgroups: comp.lang.c++
Subject: An Apology:  Made a wrong posting/reply
Date: 16 Apr 92 15:45:22 GMT
Article-I.D.: saifr00.1992Apr16.154522.4452
Organization: Honeywell Air Transport Systems Division

I apologise for making a wrong reply.  I saw a collegue's article on
Needed:  Good C++ Training Video Course and made a personal reply that is
inappropriate to the news group by hitting a wrong key.  I meant to reply
via email but made a bad mistake by posting to the newsgroup instead.

Once again, sorry for the bad mistake and wasting new resources.  I will
ensure that this will *never* happen again.

Thanks!

Josh
-- 
Josh Lam
Honeywell Inc
lam@saifr00.cfsat.honeywell.com
From: 91erol@gw.wmich.edu
Newsgroups: comp.lang.c++
Subject: Borland's Customer Service
Date: 9 Apr 92 16:57:51 EST
Summary: Borland's Customer Service
Organization: Western Michigan University

    Even though I ordered Borland C++ & Application Frameworks in the beginning of
March directly from Borland Corporation, still I have to wait three weeks more.
That is what I heard from the customer representative over the phone. You have
to wait for 30 minutes on the phone to talk to a customer representative.

   I am wondering if I am dealing with a company which has the worst customer
service in the USA. Borland is supposed to be one of the best, unfortunately
it does not seem so. 

   I think Borland should improve its customer service. I have found better
customer service when I first contacted with Microsoft. 

   Erol
     
Newsgroups: comp.lang.c++
From: stauffer@cc.swarthmore.edu (R. Glenn Stauffer)
Newsgroups: comp.lang.c++
Subject: Re: Borland's Customer Service
Date: 17 Apr 92 13:19:13 GMT
Organization: Swarthmore College Computing Center
X-Useragent: Nuntius v1.1a2

>   I am wondering if I am dealing with a company which has the worst
customer
>service in the USA. Borland is supposed to be one of the best,
unfortunately
>it does not seem so. 
>
>   I think Borland should improve its customer service. I have found
better
>customer service when I first contacted with Microsoft. 

Borland has a customer service address for Internet users:

	customer-support@borland.com
	
I have found support via this avenue to be excellent - every time I have
contacted Borland this 
way, Tim Del Chiaro, a customer support representative, has responded to
my queries promptly.

For tech support, Borland's forum on Compuserve is an excellent resource.
 I would prefer a
forum here, but the times when I have to contact tech support are worth
paying a relatively 
small connect charge.
*----------------------------*
|     R. Glenn Stauffer      |
|     Swarthmore College     |
|      Computing Center      |
| stauffer@cc.swarthmore.edu |
*----------------------------*
Newsgroups: comp.lang.c++
From: amaluf@Monet.McRCIM.McGill.EDU (Rodrick Ameen Maluf)
Subject: help
Organization: McGill University, McRCIM
Date: Thu, 16 Apr 92 20:04:35 GMT



Hi,

I am facing some problem on the sgi machines (mips processor)).

the problem is the following:

I want to call a function for which I have to determine the arguments
from the user input. Once I have determined the arguments ( their number
as well as their type ) I am having problem building the stack for the
function that I want to call with those arguments.

PS:
 I have tried using the ``asm'' directive, but I run into problems with 
 ``double'' type arguments.   


thanks for any help,

Ameen

-- 
__________________________________________________________________
Ameen Maluf:                 amaluf@larry.mcrcim.mcgill.edu
                             McGill Research Center for Intelligent Machines
                             Mcgill Univeristy, Montreal, Canada
Newsgroups: comp.lang.c++
From: alan@elroy.jpl.nasa.gov (Alan S. Mazer)
Subject: Simple destructor question
Organization: Image Analysis Systems Group, JPL
Distribution: na
Date: Tue, 7 Apr 1992 00:37:41 GMT

Can someone (probably everyone :-)) tell me why what I'm doing below dumps
core?  Thanks.
------------------
#include <malloc.h>
#include <math.h>
#include <memory.h>
#include <signal.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stream.h>
#include <sys/types.h>

typedef unsigned char uchar;

class XD_Drawable {
protected:
    int drawable_id;	// handle returned by xd_create_drawable
public:
    int init_status;
    ~XD_Drawable();
};

class XD_MonoImage: public virtual XD_Drawable {
public:
    XD_MonoImage(int width, int height, uchar* data, int upper_left_x,
	int upper_left_y);
    XD_MonoImage(int width, int height, uchar* data, int upper_left_x,
	int upper_left_y, int visible, int* display);
};

extern void exit(int);

main(int argc, char* argv[])
{
    XD_Drawable *x;
    x = new XD_MonoImage(256,256,NULL,2,2);
    delete (XD_Drawable*)x;
    exit(0);
}

XD_Drawable::~XD_Drawable()
{
}

XD_MonoImage::XD_MonoImage(int width, int height, uchar* data,
	int upper_left_x, int upper_left_y)
{
}
-- 

-- Alan
   alan@elroy.jpl.nasa.gov
From: G.Roberts@cs.ucl.ac.uk (Graham Roberts)
Newsgroups: comp.lang.c++
Subject: template class question
Date: 7 Apr 92 15:15:54 GMT


I have a query about the use of a template class name as a type
declaration within its own template class declaration. Which of the
following class declarations are legal?
a)
template <class T> class Cell
  {
    public:
      Cell(T* rm, Cell<T>* c) : rep(r), next(c) {}
    private:
      Cell<T>* next ;
      T* rep ;
  } ;

b)
template <class T> class Cell
  {
    public:
      Cell(T* rm, Cell* c) : rep(r), next(c) {}
    private:
      Cell* next ;
      T* rep ;
  } ;

The difference between (a) & (b) is that (b) uses Cell* as a type without
specifying the parameter.

g++2.1 will only accept (b) and some texts (e.g. Lippman C++ Primer 2nd 
edition) state that the angle brackets are not needed.

Borland C++ 3.0 accepts both.

The ARM & The C++ Programming Language seem to demand (a) but I'm not sure 
about this. (The C++ Programming Language has a (b) style example, for
instance).

Coplien's Advanced C++ Programming Styles and Idioms uses (a).

So, could someone provide a definitive answer as to which form is correct
(and why)?

Thanks,
Graham
------------------------------------------------------------------------ 
Graham Roberts		        email: G.Roberts@cs.ucl.ac.uk
Dept. Computer Science	         (uk): G.Roberts@uk.ac.ucl.cs
University College London	phone: +44 071 387 7050 x3716
London, WC1E 6BT, ENGLAND
------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: steve@taumet.com (Steve Clamage)
Subject: Re: cfront 2.1 bug
Keywords: virtual inheritance
Organization: TauMetric Corporation
Date: Mon, 6 Apr 1992 21:57:36 GMT

wohlenbe@inter-tel.com (Greg Wohlenberg) writes:


>     Enclosed is a code fragment that illustrates (what I assume is) a cfront
>2.1 bug.  The problem is that the "this"  pointer inside a particular virtual
>function  is  different  based  on  the type of pointer used to call it.  One
>interesting thing to  note is that removing the virtual destructor from class
>a_t seems to fix the problem.

[ Example showing virtual inheritance of the base class omitted ]

This is not a bug, but the way the language works.

A virtual base class does not in general begin at the same address
as any classes derived from it.  When you assign a derived* to a base*,
the base* pointer gets the address of the virtual base class.
	class B { ... };
	class D : virtual public B { ... }
	D d;
	B* p = &d;	// &d != p

When multiple inheritance is involved, this address conversion can
occur even with no virtual base classes:
	class B1 { ... };
	class B2 { ... };
	class D : public B1, public B2 { ... };

	class D d;
	B2* p = &d;	// &d != p

It may seem odd that removing the virtual destructor "fixed" your
problem, but it is due to side effects and compiler optimizing.  When
the virtual destructor was removed, the base class then had no
data members and no virtual functions.  In other words, it was size
zero, and the compiler optimized away all storage for it.  (Not all
compilers do this.)  In this case, the compiler could make the address
of the virtual base class the same as classes derived from it, since it
took up no space.  If you add a data member or any other virtual
functions to the base class, your code again will not work.

The "workaround" is not to assume anything about the relative addresses
of base classes and their derived classes.  There are no portable
assumptions which you can make.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
Newsgroups: comp.lang.c++,comp.std.c++
From: jak@cs.brown.edu (Jak Kirman)
Subject: Re: Call by reference using * and &
Reply-To: jak@cs.brown.edu
Organization: Dept. of Computer Science, Brown University
	<DOUGM.92Apr14053216@bradbury.cns.caltech.edu>
	<BMpB9o.rp@world.std.com>
Date: Tue, 14 Apr 1992 17:47:20 GMT

In article <BMpB9o.rp@world.std.com> berczuk@world.std.com (Stephen P Berczuk) writes:
>   1) Having a reference argument prevents you from having optional
>      arguments or default values for user defined classes (at least for
>      the moment..) for example you can have a function like:
>         foo(myclass* xx=NULL){ if(xx=NULL) // use default values}
>     but not... foo(myclass&=defaultValue);

Indeed you can:

class MyClass { };

static MyClass fooDefault;

void foo (MyClass& a = fooDefault)
{
  if (&a == &fooDefault)
  {
    // default was used
  }
  // etc.
}

main ()
{
  MyClass x;
  foo ();
  foo (x);
}

This works on AT&T 3.0.1 and Sun 2.1.

There is some name-space pollution, of course; it would be nice if the
default argument could be a static member of the function...

>   2) In past work I have done it was generally considered good form to use
>       reference args only when the arg is const so that there is NO confusion
>      about whether the arg can be side-effected.  eg, foo(const aClass& x)
>      not foo(aClass& x).  of course this is a matter of local convention,
>      but is is probably safer to stick to using referneces as a means of
>      saving object copies (without resorting to pointers, which muddy the
>      syntax at times...)

On the whole I would agree, though obviously there are cases where
pointers are not an option, such as operators.  Also, there are cases
where the semantics are obvious, and pointers simply complicate things;
a trivial example of this is a swap function.

                         Jak Kirman                        jak@cs.brown.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No matter how happily a woman may be married, it always pleases her to
discover that there is a nice man who wishes that she were not.
                                                             -- H.L. Mencken
From: bimor@cs.few.eur.nl (Jeroen Morrien)
Newsgroups: comp.lang.c++
Subject: GUI BC++ library
Summary: Looking for GUI library for BC++
Keywords: GUI, BC++, library
Date: 16 Apr 92 09:16:02 GMT
Organization: Erasmus Universiteit Rotterdam

Hi,     

I am looking for an O-O Graphic User Interface ("Window-system") library
 for Borland C++. Is there any ftp-site where something like that
 can be found ?   Or are there any people who wants to share their
 programming efforts on a GUI library of objects ?

 J. Morrien   &   M. R. van Soest,  Rotterdam - The Netherlands - Europe
 
 E-Mail: bimor@cs.few.eur.nl
	 bimor@eursus.few.eur.nl

 "We have made an software package which can replace
  the president of the U.S.A, anyone interested?"
Newsgroups: comp.lang.c++
From: dfoster@jarthur.claremont.edu (Derek R. Foster)
Subject: op. new and extra data at class end
Organization: Harvey Mudd College, Claremont, CA 91711
Date: Tue, 7 Apr 1992 06:02:06 GMT

I want to create a class with a variable-length array at the end
of the class, like so:

class Object
{
  ...various member variables...
  int length_of_data;
  char data[];
};

(before anybody says "this is ugly", yes, I know, but it's also memory-
efficient in this case. Please don't tell me to use a pointer to a
seperately-allocated block of memory.)

What I want to know is: what is the accepted c++-way to construct
such an object? I have thought about several methods. In my actual
class, several parameters must be used to construct the object, and
I am a little concerned about extra copying of those parameters
on the stack if a constructor call is needed.

Anyway, I'd like somebody very familiar with C++ to tell me which of the
below methods (or others) they prefer, and why, particularly with respect
to possible inlining, extra copying of data, number of function calls,
'standard' C++ practice, portability problems, etc.

Given the following declarations (BTW, my actual code makes it impossible
for me to make class Object local to class ObjectList):

class Object
{
  friend class ObjectList; // Objects are only used by ObjectList
  private:
    Object();  // so object can't be constructed except by ObjectList
    Object(int length, char * data);
    operator new(size_t size, size_t extra);
    operator new(size_t size, char * where);
  public:
    ...various member variables...
    int length;
    char data[];
}

class ObjectList
{
  ...
  Object * newobject(int length, char * data);
}

// method 1: ugly, but avoids extra passing of parameters.

Object * ObjectList::newobject(int length,char * data)
{
  Object * ptr = (Object *) new char[sizeof(Object)+length];
  ptr->length = length;
  memcpy(ptr->data,data,length);
  return Object;
}

// method 2: nicer, but many function calls. Is new(size_t,size_t) kosher?

inline void * Object::operator new(size_t size, size_t extra)
{
  return ::new char[size + extra];
}

inline Object::Object(int length0, char * data0)
{
  length = length0;
  memcpy(data,data0,length);
}

Object * ObjectList::newobject(int length, char * data)
{
  Object * ptr = new(length) Object(length,data);
}

// method 3: placement syntax is more standard... but not pretty.

inline void * Object::operator new(size_t size, void * where)
{
  return where;
}

inline Object::Object(int length0, char * data0)
{
  length = length0;
  memcpy(data,data0,length);
}

Object * ObjectList::newobject(int length, char * data)
{
  return new(new char[sizeof(Object)+data]) Object(length,data);
}


Thanks for any help!

Derek Riippa Foster

P.S. Is it possible to call a constructor through a pointer? Like:
Object * P = (Object *) new char[sizeof(Object)+length;
P->Object::Object(length,name);  // is this legal?
From: garyp@manutius.UUCP (Gary Powell)
Newsgroups: comp.lang.c++
Subject: Book Review wanted: "C++ for Engineers and Scientists."
Keywords: Book Review
Date: 8 Apr 92 17:20:15 GMT
Article-I.D.: manutius.639
Reply-To: garyp@manutius.UUCP (Gary Powell)
Distribution: usa
Organization: Aldus Corporation, Seattle WA

I saw this book listed as a reference in a paper I liked, however my
local bookstore does not have it.  Before I make them order this book
I would like to know if "Is it any good?" and "What level is this aimed at?"
I am not in the mood for another book on complex numbers unless there is
some unique way to implement them that all the other books have missed.
   -Gary-

PS
  Please rely directly to me as I am not able to read the net as frequently as 
I would like.
From: i899435@sheoak.ucnv.edu.au (I COUROULIS)
Newsgroups: comp.lang.c++
Subject: Books for C++
Date: 16 Apr 92 04:35:16 GMT
Organization: UCNV, Bendigo, Victoria, Australia


Hi all,

	I constantly read this newsgroup and find requests for 
books on C++.  I note that the FAQ for this newsgroup lists a
number of books on C++ with a one line description.

	I am proposing to send (monthly) to this newsgroup, a list
of books on C++, along with a description, rating ??, and any other
useful information.

	If anyone thinks this is a good idea, help me out by sending
me information about books you own/read on C++, along with any useful
comments (eg. good for beginners, excellent for OO Design, etc),
along with Publisher, Year published, Title, etc. and I will
mail an updated list each month.

	If this seems like a terrible idea, then we'll forget I
even mentioned it.


-------
Ian C.
ianc@ironbark.bcae.oz.au
(Use this address, the one in the header does not work)
 
             /\          
      ___.   | \                           
     /    \__/  \   Ian C.                 
    /            \  Dept. of Computing and Information Science
   /              \ La Trobe University College of Northern Victoria
   \              / Bendigo . Victoria.
    \    ____     / AUSTRALIA.
     \__/    \_*_/        
              __          
              \/           
			"Age is a high price to pay for maturity"
From: Bartholomew_Siemens@mindlink.bc.ca (Bartholomew Siemens)
Newsgroups: comp.lang.c++
Subject: Re: Borland support
Date: 15 Apr 92 00:24:15 GMT
Organization: MIND LINK! - British Columbia, Canada
Distribution: world

In message <1992Apr14.141744.18290@bmerh2.bnr.ca>, Coles writes:

> I`ve been trying for the past 3 days to get borland technical support. All I
> get is being on hold for 1/2+ an hour...long distance.
> 
> Does anyone know if Borland supports their products on Compuserve, email or
> FAX besides the dreaded telephone?


I've heard that voice support isn't the greatest from Borland.  I know of no
e-mail support that is official offered by Borland.  They do, however, have
very good support on Compuserve (GO BORLAND).


Guile-less
From: vkessler@ncratl.AtlantaGA.NCR.COM (Vance Kessler)
Newsgroups: comp.lang.c++
Subject: Problems w/Borland & new
Keywords: borland
Date: 10 Apr 92 13:16:17 GMT
Organization: NCR Engineering and Manufacturing Atlanta -- Atlanta, GA

I know this is not a good place for this post, but there isn't any other
place to post it that I know of.

I am having problems with Borland and memory allocation.  I am using the
text based Borland 3.0 compiler.  The problem is that sometimes my program
will have about 340K free and do a new on an object that is about
20 bytes in size.  After the new I have 16 BYTES of memory left.  It does
not always do this, I can add some code and it will go away for awhile.
But after some time (and some code changes) the problem comes back.  When 
the problem comes back, it is generally in a different place.  But the 
problem is consistently reproduceable until I recompile.

I know this sounds like an initialization problem, and it might be, but I
have looked over the code quite carefully and I think I have removed
all things that could give me problems.  I am using a template
class (in two different places) and am not using any of the Borland classes.

If anyone has had similar problems, or knows how to fix this please let me
know.  I would really like to know if my code is to blame or the compiler.


I will greatly appreciate any help I get.
Vance Kessler
From: djones@megatest.UUCP (Dave Jones)
Newsgroups: comp.lang.c++
Subject: Re: Coverage analysis on Sun
Date: 14 Apr 92 22:00:57 GMT
Organization: Megatest Corporation, San Jose, Ca

From article <1992Apr8.165751.20288@tcsi.com>, by jrk@nittany.tcs.com (John Koper):

) It looks like the C++ compiler generates a temporary directory where
) it store various files it needs to compile the code.  This directory
) is removed after the compilation phase is complete.  At run-time, the
) program expects the C source file to be in that directory but it isn't
) and the logging information is lost.
...
) If you have any ideas of what I may be doing wrong, suggested work-arounds,
) or if what I am attempting is even possible I would appreciate hearing about
) it.


As a get-around, you could write up a makefile that does the
steps cfront and cc separately and leaves the output from cfront
in the local directory. Of course you will need to "demangle" the
names to understand the output.
From: jamiller@hpcupt1.cup.hp.com (Jim Miller)
Date: Thu, 9 Apr 1992 18:31:38 GMT
Subject: Re: Best C++ Books -- Need Opinions!!!
Organization: Hewlett Packard, Cupertino
Newsgroups: comp.lang.c++

>scott@swindle.Berkeley.EDU (Scott Silvey) /  8:05 am  Apr  8, 1992 /
>
>% These are my favorite books on C++ and OOD.  I refer to them often.
>% 
>% Object Oriented Design with Applications
>% 	Grady Booch
>
>How is this book?  Is this the same guy who designed the Booch library?

   VERY good.                 I believe so.


>
>Is the book C++ oriented?  Does it have code for working applications?

    yes/no;                           Yes
    it uses C++, but also
    Smalltalk and ADA
    and one more.

    He points out that the different OOP's have different features of OO
    and to discuss OOD fully you need to not limit yourself to just one
    language at this time.


>Does it emphasize the engineering and algorithmic aspects of OO design or 
>is it just another "this is how you might design a shape library" kind of 
>book?  

  It is an excellent book on engineering principals, as well as "how you
  might design ...".  A engineering book that is all theory and no practice
  is not very useful at this stage IMO.


>I am looking for something that covers how to "THINK object oriented" as 
>oposed to thinking procedurally (as one would with plain C).

  This is the book for you.


>Scott Silvey


IMO - IMO - IMO - IMO - IMO - IMO - IMO - IMO - 

   jim miller
   jamiller@cup.hp.com
   (a.k.a James A. Miller; Jim the JAM; stupid; @!?$$!; ... )
   Anything I say will be used against me ...
   But my company doesn't know or approve or condone anything of mine here.
From: eric@tfs.com (Eric Smith)
Newsgroups: comp.lang.c++
Subject: Re: Borland C++ 3.0 Linker error - Fatal Table Limit Exceeded
Date: 15 Apr 92 12:11:20 GMT
Article-I.D.: tfs.1992Apr15.121120.4142
Organization: TFS

In article <1992Apr13.190425.9232@microsoft.com> jimad@microsoft.com (Jim ADCOCK) writes:
>In article <1992Apr8.145036.12217@tfs.com> eric@tfs.com (Eric Smith) writes:
>|I have found that those C++ compilers that are limited to 640K are not
>|very useful for real work.  I don't know if Microsoft has that limit,
>|but in the past I stopped using an earlier version of Borland because
>|it became a problem.
>
>If you were to evaluate the C7 compiler as suggested, rather than speculate 
>about it, you would find out that not only does it not have a 640K limitation, 
>but it also doesn't have many of the other compilation limits found in other 
>C++ compilers -- be they running under whatever operating system.
>
>The reason I suggest people actually evaluate the actual compilers is because
>there seems to be no other way for C++ programmers to get reliable unbiased 
>information about them.  Which is unfortunate.  Perhaps some day there will
>be careful, reliable, intelligent, independent evaluations available to
>C++ programmers -- I look forward to such a day.
>


So I have to buy all the compilers, and spend weeks learning how to use each
and get around its quirks, before deciding which is good enough to be worth
spending time and money on?  Speculating and asking questions on the net may
not be as reliable, but it sure is a lot faster and easier.

When you say it doesn't have a 640K limitation, do you mean it actually
comes with a DOS extender, so I can just use the "X" memory model, or
whatever name you use for the extended memory model, and it will
automatically link the DOS extender into the executable?  That's what
Zortech does.

That's the question whose answer can make it worth evaluating the compiler.