HDTenEightyP/NetNews huggingface dataset:
From: cobra@chopin.udel.edu (Jay Bhartkumar Patel)
Newsgroups: comp.lang.c++
Subject: Cricket Program
Keywords: Can't compile it.
Date: 5 Apr 92 18:28:10 GMT
Article-I.D.: chopin.19508
Organization: University of Delaware



I got this program from someone and  I can't compile it. 
I typed in CC crip.cc.  Can someone tell me what is wrong with this program.  

This program is used for checking addition in my file.


"crip.cc", line 2: error: illegal character '$' (ignored)
"crip.cc", line 2: error: illegal character '$' (ignored)
"crip.cc", line 3: error: cat U : cat is not a type name
"crip.cc", line 3: error: syntax error
"crip.cc", line 3: error: syntax error
"crip.cc", line 3: compiler limit exceeded: char constant too long
"crip.cc", line 3: error: newline in char constant
"crip.cc", line 3: error: bad declaration of awk -- did you forget a ';'?
"crip.cc", line 4: error: syntax error
"crip.cc", line 4: error: syntax error
"crip.cc", line 4: error: illegal character '$' (ignored)
"crip.cc", line 4: error:  type expected for field
"crip.cc", line 5: error: syntax error
"crip.cc", line 5: error: syntax error
Sorry, too many errors
Compilation failed
-------------------------------------- cut here ------------------------------

team=$1
cat $team | awk '\
BEGIN {seen=0;}
{ field = $7;
if (field > 900) {
   field -= 900;
   if (($2 >60) && (seen >=1)) printf ("%s is second wicket keeper  who can bat\n",$1);
   if ($2 >60) seen++;
   }

batbowl = $2 + $5;
batbowlfield = batbowl + field;
bowl = $5 + $6;
bat = $2 + $3;
if (bat >= 140) printf("%s too good at batting\n",$1);
if (bowl >= 125) printf("%s too good at bowling\n",$1);
if (batbowl >= 125) printf("%s too good at batting and bowling\n",$1);
if (batbowlfield >= 170) printf("%s too good all round\n",$1);
printf "%-20s %5d %5d %5d %5d\n",$1,$2+$3,batbowl,batbowl+field,$5+$6 } '



COBRA

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

Jay Patel                                     

E-mail: cobra@brahms.udel.edu 

-------------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: lewis@sophists.com (Lewis Pringle)
Subject: Re: Call by reference using * and &
Date: Fri, 17 Apr 1992 05:43:50 GMT
Organization: Sophist Solutions

In article <rmartin.703296361@willing> rmartin@willing.Rational.COM (Bob Martin) writes:
>Secondly, the forms:
>	
>	void f(TYPE*);
>	void f(TYPE&);
>
>are not semantically equivalent.  They both represent the
>pass-by-value paradigm, but the pointer form allows the argument to be
>zero, whereas the reference form does not.  The reference form
>*guarantees* that a real object is being refered to.
>
*guarantees* may be a little strong. At least it can serve to document your
expectations.

TYPE* fred = 0;
	f (*fred); will compile, and run fine, but violate your *guarantees*.

Since this works, I wonder why f(*0) fails to compile. f(*(TYPE*)0) does work, however.

At any rate, I think it a sensibly policy/convention to use references to document that a particular
pointer is expected by the API to be non-nil. But safety is far from gauranteed.



				Lewis.

-- 
Reading peoples .signatures is a real waste of time.

lewis@sophists.com                                           (Lewis G. Pringle)
Xref: sparky comp.lang.c++:6887 austin.general:1615
From: jamshid@emx.utexas.edu (Jamshid Afshar)
Newsgroups: comp.lang.c++,austin.general
Subject: Is the _C++ Report_ carried anywhere?
Date: 17 Apr 92 08:22:31 GMT
Followup-To: comp.lang.c++
Distribution: austin
Organization: The University of Texas at Austin; Austin, Texas


First, is there something like a Frequently Asked Questions list for
austin.general?  Is there a list of all the good techie bookstores and
shops in the area?  (okay, but the Yellow Pages might not be
up-to-date)

Does anyone know if the monthly _C++ Report_ mag is carried anywhere
in Austin (or maybe even San Antonio)?  The University Co-op used to
carry it, but they stopped several months ago.  They do carry the
(quarterly) _C++ Journal_, though.  There's an article in the April
issue that I really want to read (Stroustrup's dynamic typing
proposal) but I don't think my subscription card will be processed in
time.  I've already checked Bookstop, Waldenbooks and B.Dalton.

Thanks, Jamshid
jamshid@emx.utexas.edu
From: karl@hpscit.sc.hp.com (Karl Watanabe)
Date: Sat, 11 Apr 1992 21:33:40 GMT
Subject: Re: Borland's Customer Service
Organization: Hewlett-Packard, Santa Clara, CA
Newsgroups: comp.lang.c++

> 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.

They told me 2 weeks, but it actually took one week.  Maybe they are being
conservative just in case they get behind.  I was a little annoyed that the
total product came in 3 deliveries in 3 days.

>    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. 
> 
Maybe you just got someone who wasn't feeling good that day.  The lady I
talked to seemed quite nice to me.  She did try and sell me another product
which I did since she was so nice.

Karl Watanabe
Newsgroups: comp.lang.c++
From: gwu@tcsi.tcs.com (George Wu)
Subject: TI's cpp and ftp.tcs.com
Originator: gwu@nujoizey
Organization: Teknekron Communications Inc.
Date: Thu, 9 Apr 1992 19:46:46 GMT

-
     Sorry for the worldwide distribution, but I'm having trouble responding to
some email I received.  This is sort of relevant, as I do get about one request
a month for TI's cpp.

							George



   ----- Transcript of session follows -----
550 <djd@uk.ac.reading.cs.csug>... Host unknown

   ----- Recipients of this delivery -----
   <djd@uk.ac.reading.cs.csug>

   ----- Unsent message follows -----
Date: Thu, 9 Apr 92 12:34:46 PDT
From: gwu@dwight.tcs.com (George Wu)
To: djd@uk.ac.reading.cs.csug
Subject: Oops, trying the other address

>To: ajd@uk.ac.reading.cs.csg
>Subject: Re:  [c++] TI cpp with templates
>
>-
>     Unfortunately, since that time our system administration people have
>disallowed anonymous FTP connections.  As a result, we are no longer able to
>make the source code available.  My only suggestion is you try to reach the
>original Texas Instruments host: csc.ti.com (192.94.94.1).  I had originally
>intended to offer anonymous FTP only temporarily, as some people had trouble
>reaching TI's host at the time.
>
>							George
-- 
----
George J Wu, Software Engineer        : gwu@tcs.com or uunet!tcs!gwu
Teknekron Communications Systems, Inc.: (510) 649-3700
2121 Allston Way, Berkeley, CA, 94704 : Quit reading news.  Get back to work.
From: nevries@accucx.cc.ruu.nl (Nico de Vries.)
Newsgroups: comp.lang.c++
Subject: Re: Microsoft c/c++ 7.0
Keywords: Need more info
Date: 15 Apr 92 06:18:33 GMT
Organization: Academic Computer Centre Utrecht

In <313@conan.UUCP> dmitry@conan.UUCP (Dmitry Gringauz) writes:

>I need more information on Microsoft c/c++ 7.0.  What version of c++ does
>it conform to (2.0, 2.1?).  Can it produce executables for dos,  and 
It does implement parts of 3.0. No true templates but some form of exception
handling.

>does it have a built-in dos extender?   The ads say that "Qualitas 386max"
MSC itself has. But you can't generate code which has a dos extender with it.

>PS.  I've seen the mention of another company (Zortech, Watcom??) offering
>a similar "upgrade" package as Microsoft.  What is that company, and what
>are the terms of an upgrade.  I am obviously shopping for a good c++
>compiler w/windows and dos extender support.
The ONLY C++ compiler that includes extenders is Zortech. For MSC and BC++
you can buy a seperate DOS extenter from Phar Lap. Also notice Zortech
can generate 386 code (with extender) and MSC and BC++ are limited to
286 code. This makes a major speed difference.

>-- 
>Dmitry Gringauz

Nico E. de Vries
-----------------------------------------------------------------------------
USENET: nevries@cc.ruu.nl                 FIDO      : 2:281/708.1  (very new) 
VOICE : +31-3404-24931 (+31-30-316931)    FAX       : +31-30-312033 
BBS   : +31-30-341401 (Nico De_vries)     COMPUSERVE: (coming)
MAIL  : Hortensialaan 45, 3702VE, Zeist, The Netherlands 

IMPORT StdDisclaimer, MyPersonalOpinion;          - O   Place reserved for
Complaints about my spelling to DEV/NUL please.    |    funny joke. Sugestions 
I work for BITECH, I don't SPEAK for BITECH.      \_/   apreciated.
Xref: sparky comp.lang.c++:6814 comp.lang.c:7658
From: urcml@unix.cis.pitt.edu (Mun L Chan)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: How to write virtual machines in C/C++
Keywords: virtual machine
Date: 15 Apr 92 19:04:37 GMT
Organization: Univ. of Pittsburgh, Computing & Information Services

Hi,

Can someone please tell me if there are books in the flavour of
Tenanbaum's OS design & Implementation but dealing with Virtual
Machines instead of OS?  Something along the lines of implementing
a PICK system would be ideal.  Thanks.
From: comeau@ditka.Chicago.COM (Greg Comeau)
Newsgroups: comp.lang.c++
Subject: Re: MVS and C++
Date: 12 Apr 92 03:35:00 GMT
Reply-To: comeau@csanta.attmail.com (Greg Comeau)
Organization: Comeau Computing

In article <a3=A02I90fQ301@JUTS.ccc.amdahl.com> hmnarvae@ras.amdahl.com writes:
>I was wondering what the situation was with C++ and MVS. .....
>Any info out there?

I know I've never regretted the day I left the mainframe world. ;-)

Anyway, we here at Comeau researched such a port a little over a year ago.
With our 3.0 out the door, now is probably a good time for us to reconsider
doing it.

- Greg
-- 
	 Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418
                   Producers of Comeau C++ 3.0 With Templates
          Here:attmail.com!csanta!comeau / BIX:comeau / CIS:72331,3421
            Voice:718-945-0009 / Fax:718-441-2310 / Prodigy: tshp50a
Organisation: European Space Operation Centre (E.S.O.C)
Date: Friday, 10 Apr 1992 11:37:36 CET
From: <MPACE@ESOC.BITNET>
Newsgroups: comp.lang.c++
Subject:    COOL for cfront 2.1

I'd like to know if some of you knows about the public availability
of COOL for cfront 2.1 (and, why not, cfront 3.0).

I have COOL for cfront 2.0 and had problems to compile
it with 2.1, so I gave up trying that.

On the other hand, I do not have time enough to try adapting it
to cfront 2.1 (gosh, I'm a busy guy !!)

Cheers, Marco


-------------------------------------------------------------------------
Marco Pace, Software Engineer
ESOC, Robert-Bosch-Strasse 5, D-6100 Darmstadt, Germany
E-mail: MPACE@ESOC.BITNET
Voice:  +49 (0)6151 903065
Fax:    +49 (0)6151 904065
-------------------------------------------------------------------------
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.c++
Subject: Re: Is this a FLAW in C++ ??
Date: 11 Apr 1992 19:29:05 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com
Keywords: C++ FLAW VIRTUAL VARIABLES

In article <Apr.11.07.17.53.1992.9372@yoko.rutgers.edu> emuleomo@yoko.rutgers.edu (Emuleomo) writes:
>However, I think there may be a FLAW in the language!

Just one?

>We have virtual functions, but not virtual *variables*. (Why Dr Stroustrup?)

>What I would love to do is have a base class that knows how to
>perform those operations on the derived class's static array and static 
>variables .

Write a virtual function that returns a pointer to the array or variable.

>NB: CLOS (the Common Lisp Object System) has before methods and After methods
>(These are methods called BEFORE and AFTER the method you called is called!)
>I really think C++ would benefit from these too!

Not to mention all the other types of method combination.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.lang.c++,comp.std.c++
From: davisonj@en.ecn.purdue.edu (John M Davison)
Subject: Re: Call by reference using * and &
Organization: Purdue University Engineering Computer Network
Date: Tue, 14 Apr 92 13:57:17 GMT

In article <DOUGM.92Apr14053216@bradbury.cns.caltech.edu> dougm@cns.caltech.edu (Doug McNought) writes:
>In article <1992Apr13.214311.24013@saifr00.cfsat.honeywell.com> lam@saifr00.cfsat.honeywell.com (Josh Lam) writes:
>   In C++, call by reference can be [faked] using pointers (like in C) or
>   by reference (&).  Question:  What are some advantages of using references

>Some people don't like using references for [deleted] purpose, since when
>reading
>the code it is not immediately obvious from the form of the function call that
>a variable might be changed by the function.

        Like when you pass an array in C?

> With the address passed explicitly
>it is clearer that this is a VAR parameter (as we ex-Pascal types say :).

        No, it isn't.  A responsible C++ programmer will make intelligent use
of the "const" keyword to distinguish between read-only and "write/modify"
access, e.g.

int foo(const thing &baz)     baz is read-only, passed by reference
int foo(thing &baz)           baz is writable, passed by reference

        A decent C programmer can do the following:

int foo(const thing *baz)     baz points to a read-only segment
int foo(thing *baz)           baz points to a writable segment

>Often it is clear from 
>context that a variable is being changed.

        If isn't clear, you are probably doing something wrong.

davisonj@ecn.purdue.edu
Newsgroups: comp.lang.c++
From: lewis@sophists.com (Lewis Pringle)
Subject: Re: Simple destructor question
Date: Tue, 14 Apr 1992 15:53:23 GMT
Organization: Sophists Solutions

In article <1992Apr7.003741.7895@elroy.jpl.nasa.gov> alan@elroy.jpl.nasa.gov (Alan S. Mazer) writes:
>Can someone (probably everyone :-)) tell me why what I'm doing below dumps
>core?  Thanks.
>------------------
>
>class XD_Drawable {
...
>};
>
>class XD_MonoImage: public virtual XD_Drawable {
...
>};
>
>main(int argc, char* argv[])
>{
>    XD_Drawable *x;
>    x = new XD_MonoImage(256,256,NULL,2,2);
>    delete (XD_Drawable*)x;
>    exit(0);
>}
>

This should not even compile. Since XD_MonoImage is a VIRTUAL subclass of
XD_Drawable, you cannot cast from XD_MonoImage* back to XD_Drawable*.

BTW, why would you be casting in the first place??? Simply calling 'delete (x)'
should work fine and dandy.


				Lewis.


-- 
Reading peoples .signatures is a real waste of time.

lewis@sophists.com                                           (Lewis G. Pringle)
From: warwick@cs.uq.oz.au (Warwick Allison)
Newsgroups: comp.lang.c++
Subject: Re: overloading [] for bitvectors?
Date: 13 Apr 92 23:50:20 GMT
Reply-To: warwick@cs.uq.oz.au

In <Garym.0bo0@qube.OCUnix.On.Ca> Garym@qube.OCUnix.On.Ca (Garym) writes:

>     bitvector[17] = TRUE;
>     if (bitvector[3]) do_something();

The GNU "BitString" and "BitSet" classes might help.  (I don't know if
something similar appears with other compiler, but they seem like
pretty obvious standard libraries).


Warwick
--
  _-_|\      warwick@cs.uq.oz.au            / eastings genistas /
 /     * <-- Computer Science Department,  / giantess seatings /
 \_.-._/     University of Queensland,    / teasings tsiganes /
      v      Brisbane, Australia.        / -------- -------- /
Newsgroups: comp.lang.c++
From: hmiller@osiris (Harry Miller)
Subject: Re: Can any MSDOS C compiler handle big files?
Organization: University of Illinois at Urbana
Date: Fri, 10 Apr 1992 14:56:28 GMT

jyelon@dante.cs.uiuc.edu (Josh Yelon) writes:

>Is there any MSDOS C compiler that doesn't say "error: code segment
>too large" when you give it a big source file? 

><FLAME ON>

>This is absurd behavior for a compiler. Code segments and other
>machine-specific details are the compiler's job --- That's what I use
>a compiler for! "Code segment too large" is nothing but a glorified
>compiler bug.

>Oh, Don't tell me to chop the C code up into pieces. The C code is
>program generator output - any changes to it would get overwritten
>the next time I changed the _real_ source.

><FLAME OFF>

No, this is not a compiler bug, it is a limit to DOS!  DOS is a real
mode operating system, that is if the cpu is a 386/486 DOS always runs
in real mode not protected mode.  DOS only allows 64k segments thats it.

A good alternative is to go to protected mode compilers.  These compilers
add some extra code into your program that switch the cpu into protected
mode for many of its operations and then switches back to real mode.

What I have just said is a watered down version of what I know about
protected mode programming which is not a lot.  

I've been looking at protected mode compilers the last couple of days,
and probably the best one for its price is djgpp, its free.

Harry E. Miller ----------------- just a jerk lurking on the net
hmiller@osiris.cso.uiuc.edu ----- where to send the hate mail
From: gordie@mcode.amdahl.com (Gordon Freedman)
Newsgroups: comp.lang.c++
Subject: Re: Initializing static class members?
Date: 7 Apr 92 22:26:12 GMT
Reply-To: gjf00@duts.ccc.amdahl.com
Distribution: comp
Organization: Amdahl Corporation, Sunnyvale Ca.

In article <BLK.92Apr2131955@vanity.mitre.org>, blk@mitre.org (Brian L. Kahn) writes:
> 
> I can't find a good way to initialize my static class members.  I want
> to have some structures with data in them for one of my classes, but I
> am prevented from using the initializer syntax of
>   static int serveMeans[MACHINES][PARTS] = {{6, 1}, {5, 3}, {0, 2}};
> which I would like to use.  I do not want to write a class initializer
> to copy a constant declared in the initializer routine into a static
> member because of the complexity of some structures and the ugliness
> of that approach.  I am currently using globals for what should be
> static class members.
> 
> There may not be a nice solution, but can anyone explain why C++ won't
> allow the initializer form for static members?  I just don't
> understand the difficulty, and it looks consistent with C syntax.
> 
> --
> B<   Brian Kahn   blk@security.mitre.org   "may the farce be with you"

It is possible you are making the same mistake I made with statics, and
that is to use the word "static" in front of the actual place where
you initialize the value. Here's an example of how to do it right:

-----------file foo.H-----------

class foo {
private:
	static int fints [MAX] ; // assumes MAX defined somewhere
	...
} ;

-----------end of foo.H-------------

-----------file foo.C------------
#include "foo.H"

foo::fints [MAX] = { 1, 2, 3, 4 } ;

------------end of foo.C------------

-- 
Gordon Freedman: gjf00@duts.ccc.amdahl.com  -> Dis: DAT
The difference between theory and practise in practise is greater than
the difference between theory and practise in theory - someone else's sig
From: lhuynh@siam.ICS.UCI.EDU (Thomas Huynh)
Subject: Inheritance question
Newsgroups: comp.lang.c++
Date: 11 Apr 92 00:14:14 GMT

Hi,

	If I have a class, say,

		class A {
		  protected :
		    int a
		};

	and

		class B : public A {
		  ..
		};

	and

		class C : public B {
		  ..
		};

	will Class inherit the variable a from Class A?

	Thanks for your answer.



--
Thomas Huynh  lhuynh@bonnie.ics.uci.edu
Information and Computer Science
University of California, Irvine
Newsgroups: comp.lang.c++
From: carroll@hercules.cis.udel.edu (Mark C. Carroll)
Subject: Re: C++ as a 1st programming language ?
Organization: University of Delaware, Newark
Date: Wed, 15 Apr 1992 13:57:16 GMT

In article <1992Apr14.202824.14288@colorado.edu> wilde@tigger.Colorado.EDU (Nick Wilde) writes:
>
>Greetings - How would you rate C++ as a language to 
>*teach* programming in, from the beginning ?
>

Frankly, I think it would be a very poor choice.

When you're trying to teach someone to program, you want to use a
language that allows you to talk about the concepts of programming and
the process of problem solving. You don't want to get stuck spending
a lot of time trying to deal with the grit and grime of day to day
development programming.

C++ forces you to deal intimately with the distinction between
language intrinsic features and libraries, with the two-file
(header/code) approach, with all sorts of confusing scoping problems,
with pointers, address calculations, constructors/destructors, etc.
If you teach C++, you need to spend so much time talking about the
intricacies and subleties of the language that you don't get to focus
the proper attention on the conceptual issues of programming.

In addition, C++ compilers tend to give _confusing_ errors, C++
debuggers tend to be difficult to use, and the compiler doesn't check
for the kinds of errors that students are most likely to make.

C++ is good as a second language. Once the students have mastered the
conceptual issues of programming, then C++ is a reasonable choice.

I'd rather see students get started in something like Scheme, where
you can very easily talk about abstractions and concepts without
getting trapped in the implementation details.

	<MC>


--
From: liu@matt.ksu.ksu.edu (Zu-Huan Liu)
Newsgroups: comp.lang.c++
Subject: Borland C++ 3.0 for Sale
Date: 13 Apr 1992 14:03:51 -0500
Organization: Kansas State University
Distribution: world
NNTP-Posting-Host: matt.ksu.ksu.edu

The whole package. Still Not Opened yet. Only one copy.
Only $100.00 (include shipping UPS Ground) or best offer.
If you are interested of the package , please contract with me.
From: strider@concour.cs.concordia.ca (GEORGAKAKIS peter)
Newsgroups: comp.lang.c++
Subject: Re: Borland's design decisions
Date: 11 Apr 92 16:29:16 GMT
Organization: Concordia University, Montreal, Quebec

In article <1992Apr10.163758.29596@borland.com> pete@borland.com (Pete Becker) writes:
>In article <1992Apr9.123716.1061@pictel.com> boba@pictel.com (Bob Alexander) writes:
>>pete@borland.com (Pete Becker) writes:
>	Well, I don't want to get off into the side issue of what iterators
>ought to do, but my view of an interator is that it doesn't make sense to
>modify a container while you're iterating through it.  Makes the semantics
>of the iterator rather hard to describe.  I know there are others who don't
>share this view...

Maybe not, but it would be usefull to have.  You position yourself to
the element and start inserting/removing/(insert favorite operation).

I view iterators as objects that maintain currency on a collection and
tell the collection what what current element they are pointing to
when queried by the collection.  Furthermore collections know what
iterators are iterating over them and can properly adjust the
iterators when necessary (that is when the collection is modified).

>	But more to the point, yes, a linked list probably ought to provide
>things like insertAfter().  On the other hand, most folks shouldn't be
>using linked lists at all.  They should be using an abstraction that fits
>their problem space.  That abstraction has things like "give me the nth
>element", "add this item after the nth element", etc.  That abstraction can
>be implemented in many different ways.  

Iterators provide this level of abstraction.  A well designed collection 
library should allow you to use a collection at the most abstracted level.
For example, if it is possible to code at the collection level rather than the
linked-list (or vector) level than doing so will allow you to maximize your 
reuseability since the underlying implementation of the collection is 
irrelevant.

>Two that jump to mind are a linked list
>and a vector.  But the decision on which to use depends intimately on the
>runtime characteristics of the particular program, and that choice may have to
>change as the program develops.  Hardcoding a linked list may create 
>maintenance problems if it turns out that a vector would work better.  The
>code should be written to use some sort of sequencing abstraction which can
>be implemented transparently as a linked list, a vector, a trie, or whatever.

Deja vu. :-)

>	All of which has very little to do with the original comment...
>	-- Pete

Peter Georgakakis
Newsgroups: comp.lang.c++