HDTenEightyP/NetNews huggingface dataset:
From: shyam007@ccwf.cc.utexas.edu (Shyam sundar P Cherlopalle)
Newsgroups: comp.lang.c++,comp.windows.ms,comp.windows.ms.programmer
Subject: HELP!! Using the timer in windows
Date: 30 Jul 92 21:46:52 GMT
Reply-To: shyam007@ccwf.cc.utexas.edu (Shyam sundar P Cherlopalle)
Followup-To: comp.lang.c++
Organization: The University of Texas at Austin, Austin TX
Originator: shyam007@tramp.cc.utexas.edu




    I am programming in Borland's Object windows environment and I came
 across some problems in using the timer ie., WM_TIMER message. I wrote
 a message response function for WM_TIMER message and the function is
 never executed though I made sure that the timer was set up. I also
 tried overloading the DefWndProc function of the window for which timer 
 is setup and tapping the WM_TIMER message. Even that didnot work. Then
 I tried setting up the timer using
            SetTimer(hWnd,1,1000,lpfnTimerfunc);
   ( FARPROC lpfnTimerfunc).
 But it gives me error for the statement
  lpfnTimerfunc = MakeInstance(TimerProc,hInstance);
 ( where TimerProc is void FAR PASCAL TimerProc(HWND,unsigned,WORD,LONG);)
           saying that 1) cant convert 
 void (pascal near*)(const HWND near*,unsigned int,unsigned short, long)
     to
 void (pascal *)()
  2) Type mismatch in call to
  pascal MakeProcInstance(void (pascal*)(), const HINSTANCE near*)

      I could not get around these error messages. All I want is a timely
 action when a window is open. I would appreciate any help that could get
 me around this problem or help me execute a function(say MessageBeep(0)) 
 repeatedly after every interval of time(say 5 secs) when a window is open.
 It would also be helpful if someone could send me source code for the same.
 
 Thanks in advance.

 -------------------------------------------------------------------------
 Shyam Cherlopalle                      The University of Texas at Austin
 email - shyam007@ccwf.cc.utexas.edu
 ---------------------------------------------------------------------------
From: vnagar@godzilla.intel.com (Vivek Nagar)
Newsgroups: comp.lang.c++
Subject: Object transportation
Date: 27 Jul 92 17:52:18 GMT
Reply-To: vnagar@godzilla.intel.com (Vivek Nagar)

I have an application in which I have to transport arbitrary objects
over the network using sockets. Do I have to implement a socket stream
class? If so can it be derived from iostream? Any pointers and/or
examples would be extremely helpful.

Thanks

Vivek

--------------------------------------------------------------------------
Vivek Nagar				Email:	
Software Engineer			vnagar@mipos3.intel.com
Intel Corporation			
(408) 261 2142 (R)
(408) 765 4264 (O)
--------------------------------------------------------------------------
Newsgroups: comp.lang.c++
From: jss@lucid.com (Jerry Schwarz)
Subject: Re: Bizarre Borland stream bug
Reply-To: jss@lucid.com (Jerry Schwarz)
Organization: Lucid, Inc.
Date: Thu, 30 Jul 92 23:49:06 GMT

In article <1992Jul30.193832.2535@noose.ecn.purdue.edu>, psmith@iies.ecn.purdue.edu (Paul Smith) writes:
||> 
|> Looks kinda like it is reading 0009 as an octal constant because of 
|> the leading zeros, except that 9 isn't a valid octal digit so it gets 
|> bumped to the next read.
|> 
|> Is this correct behavior?  I dunno.
|> 


This is correct behavior if the ios::basefield of a stream
has no bits set by default.  For input that condition means
use C lexical conventions.  

So the answer to the original problem is to set that field
explicitly.
	
	in.setf(ios::dec,ios::basefield) ;


The tricky part of the question is whether Borland is
properly initializing flags hen an istream is constructed. 
The original AT&T documentation (which I wrote) doesn't say.
Although the code (which I also wrote) initialized to
ios::skipws|ios::dec.  Not documenting that was a 
bad oversight. The latest working paper from X3J16 (which I 
have also had a hand in) says initialize to zero, but I've
just made a note to review that decision.  

  -- Jerry Schwarz
From: spt@aber.ac.uk (Steve Trythall)
Newsgroups: comp.lang.c++
Subject: speeding up development time
Date: 22 Jul 92 09:41:35 GMT
Organization: University of Wales, Aberystwyth

I am being incredibly slowed down by the compile, link, dbx load, run cycle
and I am very keen to find a solution to this.  I have looked at Object Centre
but it took 100 mins to start up my program which normally only takes 1.5 mins!
(I am currently looking at energize)

What I would really like is a simple incremental linker that I could use 
with my current environment (sun C++ and dbx).  Has anyone tried to do this?
Is there one available on the network anywhere?

Yours desparately

Steve Trythall
PSTI
Aberdeen, Scotland
Newsgroups: comp.lang.c++
From: torng@m.cs.uiuc.edu (Ming-Hwa Torng)
Subject: Turbo Vision
Keywords: TInputLine
Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
Date: Fri, 31 Jul 1992 19:04:41 GMT

Hope you, the experienced Vision programmers, can give me a hint

I have inserted, say 8 TInputline, into a Dialog. Let's name them 
control1, control2, ... control8 for each TInputLine.

In diaglog, it will be like

             control1     coontrol2
             control3     coontrol4
             control5     coontrol6
             control7     coontrol8

By deafulat, Tab key will cycle this, namely Tab key will go from control1,
control2, ...control8, control1, ....

Now, my question.

Isn't it good that I can have a arrow key that can cycle column only. i.e. At 
control1, press down arrow key will go to control3, control5, control7, 
control1 ... Similarly for other column. 

2nd question, How can program tell which focused TInputLine is currently at?

Thanks for any suggestions.

- Ming

-- 
Ming-Hwa Torng     e-mail: torng@cs.uiuc.edu
Department of Computer Science
University of Illinois at Urbana
Newsgroups: comp.lang.c++,comp.std.c++
From: mat@uunet.uu.net!mole-end
Subject: Re: Is It Illegal Construct ?
Organization: :
Distribution: na
Date: Mon, 27 Jul 1992 08:27:27 GMT

In article <1992Jul26.064922.22891@noose.ecn.purdue.edu>, luj@nationalrd.ecn.purdue.edu (John Lu) writes:

> typedef int Pint;
> 
> typedef struct {
>     union Ploc_pets {
>         struct Ploc_pet_r1 {
>            Pint         unused;
>         } pet_r1;
>         struct Ploc_pet_r2 {
>            Pint         unused;
>         } pet_r2;
>         struct Ploc_pet_r3 {
>            Pint         unused;
>         } pet_r3;
>     } pets;
> } Ploc_data;

> "foo.C", line 4: internal <<AT&T C++ Translator 2.1.03 08/31/90>> error:
> Ploc_pets is not a class name

I don't know if it's a compiler fix or a language change, but it compiles
fine on Comeau's port of C++ Release 3.0.
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile

 uunet!mole-end!mat, Somewhere in Matawan, NJ
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Newsgroups: comp.lang.c++
Subject: Re: strdup()  Was: Re: Renew?
Date: 29 Jul 92 16:42:02 GMT
Organization: MAXTAL P/L C/- University Computing Centre, Sydney

In article <1992Jul27.201834.13654@Warren.MENTORG.COM> adk@Warren.MENTORG.COM (Ajay Kamdar) writes:
>
>Is there any move towards providing C++ified versions of functions like
>strdup() as part of some standard library? Right now the only solution
>I know is to implement my own version of such functions.

	Please dont implement functions: you want *classes*.
-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
From: jbn@lulea.trab.se (Johan Bengtsson)
Newsgroups: comp.lang.c++
Subject: Re: C++ Return Types
Date: 23 Jul 92 19:15:31 GMT
Organization: Telia Research AB, Aurorum 6, 951 75 Lulea, Sweden
X-Newsreader: Tin 1.1 + PL3


ark@alice.att.com (Andrew Koenig) writes:
: In article <1992Jul21.112354.1@vax1.umkc.edu> kramasamy@vax1.umkc.edu writes:
: 
: > 	If we adopt the second solution for the above class definition we run
: > into problems of deallocating 'ptr' thro' destructor and the calling routine will
: > get a garbage bitmap. How can we return for such cases?
: 
: By making sure the bitmap class has a properly defined copy constructor.

	... and assignment operator.

-- 
--------------------------------------------------------------------------
| 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++
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: Committee Members -> What do you think?
Organization: Computer Science, University of Melbourne, Australia
Date: Sat, 25 Jul 1992 08:25:51 GMT

mat@uunet.uu.net!mole-end writes:

>In article <1992Jul23.010605.16404@microsoft.com>, jimad@microsoft.com (Jim Adcock) writes:
> 
>> Again, your statements fly in the face of the reality of the committee's
>> actions.  If ALL "changes" to the language were equally routed through
>> the "extensions" committee and ALL changes to the language were equally
>> placed on the extensions WG queue for a couple years and if ALL changes
>> were required to be written up in detail by their proposers, subject to
>> days and days of "extensive" extensions WG detail analysis, THEN your
>> statements would make sense.  BUT, ON THE CONTRARY, there are many changes
>> to the language that are happening without going through the extensions
>> group.  The work of the libraries WG being one example.  "Humpty Dumpty"
>> const being another example....
>
>By ``Humpy-Dumpty const'' I assume you mean the proposal for  ~const  members,
>which aren't quite Humpty-Dumpty as the programmer declares AHEAD OF TIME
>what  const  is to mean, rather than letting the reader discover afterward.
>That proposal IS going through the Extensions WG.  It resulted in about five
>hours discussion in Toronto, with the WG interested in the core of the
>proposal, but not in all of the secondary parts.  Issues that were discovered
>are being discussed by email among the WG members right now.

No, I think that he means the change which clarified the wording of the ARM to
explicitly allow cast-from-const. Apparently the previous wording was open to
interpretation, so compilers could have made optimizations assuming that
const really meant constant and still claim to be "ARM-compliant".
This change was apparently never voted on; apparently it was decided on by
the secretary (or president?) on the basis of discussion with Bjarne as to
the original intended meaning of the ambiguous wording.

[Disclaimer: I have absolutely no first-hand knowledge of any of this; the
above is just what I have gleaned from reading this forum for a while.]

-- 
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: jrobie@netmbx.netmbx.de (Jonathan Robie)
Subject: Re: Language extensions for run-time type identification
Organization: netmbx, Berlin, Germany
Date: Tue, 21 Jul 1992 10:30:44 GMT

maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:




>	Anyone any idea of the space overhead of run-time
>type info? {Of course, I know, it depends ...}

>>Pragmas would be necessary to switch it on and off

Think about what you have to store for each class: a complete
set of the data types, including user defined data types.
I suspect that the total minimum memory overhead is similar to having
an extra object or so from each class.  If you want to keep strings
around to identify the types (nice for debuggers, class browsers, etc.)
then it gets several times bigger.  On a DOS machine this can make
a difference.

>	IMHO run-tim type info is something you should inherit.
>If one of your bases has it, you ought to too. If the base doesnt
>have it, you cant down cast. That PUBLISHES the availability
>of the downcast, I think I would accept this.

That certainly has some advantages.  Would you rule out a central class
dictionary, then?  If not, how would you regulate access to it?


Jonathan

===========================================================================

Jonathan Robie		jrobie@netmbx.UUCP
Arnold-Zweig-Str. 44	jrobie@netmbx.in-berlin.de
O-1100 Berlin		
Deutschland		Phone:  +37 (2) 472 04 19  (Home, East Berlin)
				+49 (30) 342 30 66 (Work, West Berlin)


-- 
Jonathan

===========================================================================

Newsgroups: comp.lang.c++
From: pkt@lpi.liant.com (Scott Turner)
Subject: Re: const on pass by value
Organization: Liant Software Corporation
Date: Mon, 27 Jul 1992 17:27:39 GMT

In article <23312@alice.att.com>, ark@alice.att.com (Andrew Koenig) writes:
|> (John MAX Skaller) writes:
|> 
|> > I think the following should be legal:
|> 
|> > void foo (int a);
|> > void foo (const int a) { .... } // SAME as foo above
|> 
|> It is much easier to describe and understand the language if any difference
|> at all in argument types means that the functions are different.  That ideal
|> is not quite possible because C mandates an array/pointer equivalence,
|> but I think complicating that rule further should require some corresponding
|> benefit.

The benefit would be separation of interface from implementation.
There would be a little less irrelevant clutter in "foo.h".
I could change
	void foo (const int a) { .... }
to
	void foo (int a) { .... }
without recompiling everything that uses "foo.h". 
--
Prescott K. Turner, Jr.
Liant Software Corp. (developers of LPI languages)
959 Concord St., Framingham, MA 01701 USA    (508) 872-8700
UUCP: uunet!lpi!pkt                          Internet: pkt@lpi.liant.com
From: rmartin@thor.Rational.COM (Bob Martin)
Newsgroups: comp.lang.c++
Subject: Re: Novice? question: Designing for multiple inheritance w/ templates
Date: 27 Jul 92 21:27:33 GMT

mat@mole-end writes:


|This is exactly what I was saying.  The thing added by Virtual MI is added
|not for the sake of what the class represents, but for the sake of the
|class representation.  It doesn't represent something in the problem
|domain and won't appear on an object-occurrence or class-relationship
|diagram.  Instead it provides something that belongs to the solution domain,
|to the properties of the programmatic object rather than the analysis
|object.

I don't think this is a hard and fast rule.  It would not surprise me
to find a class in the problem domain which must conform to more
than one interface.  But I think it is pretty rare.  I agree with you,
MI is more of tool in the solution domain, then an expressive
component of the problem domain.


--
+---Robert C. Martin---+-RRR---CCC-M-----M-| R.C.M. Consulting         |
| rmartin@rational.com |-R--R-C----M-M-M-M-| C++/C/Unix Engineering    |
|     (Uncle Bob.)     |-RRR--C----M--M--M-| OOA/OOD/OOP Training      |
+----------------------+-R--R--CCC-M-----M-| Product Design & Devel.   |
Newsgroups: comp.lang.c++
From: vadim@cix.compulink.co.uk (Vadim Lebedev)
Subject: Re: Renew?
Cc: vadim@cix.compulink.co.uk
Reply-To: vadim@cix.compulink.co.uk
Date: Wed, 29 Jul 1992 00:04:00 +0000


In artcile <23322@alice.att.com> ark@alice.att.com (Andrew Koenig)
writes:


> >   ObjWithRenew *p; 
> >   p = (ObjWithRenew *)realloc(old, newsize);
> >   p->renewed(s);  // We can do this because realloc copied
> >            // the vptr too
> 
> No such luck.  People are entitled to write classes whose objects,
> for example, store their addresses in other data structures.  In general,
> you cannot expect to be able to copy the bits that represent an
> arbitrary object from here to there without breaking things.

I  agree, that a pointer to original object stored somewhere
else creates a dangerous situation, but this is still true even if the
'operator renew' was built-in in the language. Renew and realloc should
be always used with caution.  

> 
> Moreover, implementations that use pointers rather than offsets to
> locate virtual base classes are guaranteed to break under such movement.
> That includes all cfront-based implementations.

I agree with this too. Well, storage allocation and deallocation are
always VERY implementation dependent and tend to be rather non-portable
across different implementations, and this particular implementation
will not work with Cfront.  It works, however, with Zortech compiler.
Actually the point i was trying to made is that the 'operator renew' 
functionallity could be implemented using existing language facilities.
Of course if the thing could be provided automatically by the language
it would be more robust.

BTW, maybe there is a way to patch virtual base pointers in Cfront 
implementation.

-----------------------------------------------------------------------
Vadim Lebedev                      |   Kortex International
vadim@cix.compulink.co.uk          |   139-147 av. Paul-Vaillant Couturier
                                   |   93126 La Courneuve - CEDEX, France


Newsgroups: comp.lang.c++
From: dwo1@gte.com (Donald W. Ottens)
Newsgroups: comp.lang.c++
Subject: tutoring, general help request
Keywords: tutoring help assistance
Date: 30 Jul 92 00:32:53 GMT
Distribution: usa
Organization: GTE Laboratories Incorporated, Waltham MA


Greetings,

I am currently on a very demanding schedule and need some tutoring
in c++ during the next two weeks.  Some of my questions are so novice
and general that I was hoping to find an individual(s) who would be
available via email or in-person to answer and guide me.

I believe this help would be above the call of regular newsnet help, so
I will pay a negotiable rate to whomever can provide assistance.

The best next step is to contact me and we can talk details and dollars.

I hope someone can tutor me for this short period.  Thank you.

don ottens
dwo1@gte.com

Please call:  wk 617-466-2071  (call collect)
            
thanks again!
From: bright@nazgul.UUCP (Walter Bright)
Newsgroups: comp.lang.c++
Subject: Re: Power Operator vs NANs
Date: 20 Jul 92 18:18:48 GMT
Reply-To: bright@nazgul.UUCP (Walter Bright)
Organization: Zortech, Seattle

In article <1992Jul15.123527.3771@bnr.co.uk> pgh@bnr.co.uk (Peter Hamer) writes:
/In article <1992Jun29.144814.5240@u.washington.edu> rons@hardy.u.washington.edu (Ronald Schoenberg) writes:
//I am a numbercruncher working in C++ (using M++) and I think that even
//more important than a power operator would be the addition of the IEEE
//floating point specifications as was done in Zortech C++.  NaN's and
/I am not familiar with the Zortech solution, and would welcome more info.

The paper describing it was included in the latest ANSI C++ mailing.

/Traditionally in C and C++ every effort has been made to permit efficient, 
/conformant compilers on a wide range of hardware. Even if this left important
/details of the semantics undefined (eg division involving negative numbers).
/Like it or not, this is the tradition.
/
/Any NaN solution acceptable to the C++ committee would presumably have to
/`work' on hardware which does not support NaNs etc. Would this leave much
/possibility of support beyond testing if a number was a NaN (which always
/fails if the hardware doesn't support them)?

C++ has abandoned ones-complement hardware and 6-char linkers, that C
was unwilling to leave behind. Maybe it is time to leave behind non-IEEE
floating point too.

/Exactly what would a language extension give you that you couldn't do using
/(FPU specific) function calls?

What you gain with a language extension vs function calls:
1. syntactic clarity
2. portability (assuming others implement it too)
3. compiler can detect errors
4. static initialization
5. efficiency

For instance, only Zortech's compiler correctly (IEEE 754) implements
== and != (others set the exception bits incorrectly if one operand
is a NAN). Do you really want to do isequal(a,b) instead of a==b?
Newsgroups: comp.lang.c++
From: brister@decwrl.dec.com (James Brister)
Subject: delete this;
Organization: DEC Western Software Lab
Date: 23 Jul 92 17:29:45

Is that legal? Opinion around here is that it's OK as long as it's the last
thing I do in the method (i.e. I don't try to access any data inside the
object). 

The situation is that I have a referrence count in an object, and I want to
do obj->decrementRefCount(); and if the ref count drops to zero, then
have the object get deleted (rather than force the function calling
decRefCount to check for this and call delete itself).

Possible problems?

Thanks

James
--
James Brister                                           brister@wsl.pa.dec.com
DEC Western Software Lab., Palo Alto, CA                        decwrl!brister
Newsgroups: comp.lang.c++
Subject: Where is 'TV.LIB'?????
From: achaboty@desire.wright.edu
Date: 30 Jul 92 20:29:34 EST
Organization: Wright State University 

	Just a quick question, please.  I recently bought BC++ 3.1 and tried
messing around with some of the graphics examples from the books.  Each time
I try to compile the programs I get an error saying that it can't find
'TV.LIB'.  And you know, it's right.  I have no file anywhere by that name.
	I guess I'm suppose to have this library file, but couldn't find it
even after searching through all the zipped filed on the disks supplied.
Is there somethig wrong with my programming/book examples/installation/
compiler?  I'm sort of at a loss.  I don't want to phone Borland if it's 
the result of something stupid on my account.  So, exactly what is it that
I seem to be doing wrong.
	Many thanks.

				--- Andrew



+=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=+
|  Andrew Chaboty   |  achaboty@desire.wright.edu   |   Why in the world    |
|   "Gamahuche"     |   Wright State University     | would I want to speak |
|     KB8LUQ        |        Dayton, Ohio           | for this university?  |
+=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=+