TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: NEIL HELLER
from: CHRIS DOWNS
date: 1997-09-03 06:58:00
subject: Re: PRINTING POINTER VALU

 CD>  void foobar(int type, long additional_info_of_some_type);
 
 CD>  If you want to call foobar() with a CString, the cast to the LP(C)STR 
 CD>  does a type conversion and the cast to the long is to satisfy the 
 CD>  semantics of the function you want to call.
 NH> I'm not trying to be a smart-ass believe me; what I assume of that
 NH> function is that if "type" is a particular value, 
 
 "type" is somewhat misleading. "command" would be a better choice. 
 But the command chosen does then imply what the type of the 
 other parameter is expected (after type conversion in the called
 routine.)
 NH> you'll cast the long
 NH> back into a far pointer and dereferrence the pointer in order to get
 NH> at the string.  Correct?
 Bingo!
---
 þ Blue Wave/QWK v2.12 þ
---------------
* Origin: St. Louis Users Group (1:100/4)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.