cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/18/12:10:35

From: silkwodj AT my-dejanews DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Providing a "cast"
Date: Mon, 18 Jan 1999 17:02:57 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 13
Message-ID: <77vpfp$unj$1@nnrp1.dejanews.com>
NNTP-Posting-Host: 205.147.228.2
X-Article-Creation-Date: Mon Jan 18 17:02:57 1999 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)
X-Http-Proxy: 1.0 x11.dejanews.com:80 (Squid/1.1.22) for client 205.147.228.2
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I would like to cast an int screen = 0; as a pointer (yes, with value zero)
so I can pass this as an argument to an assembly routine that alternativly
writes to a buffer or video ram depending on whether the passed parameter is
zero or a valid pointer to my buffer array.  This will work most of the time,
but when the argument is passed to functions that are members of classes the
warning becomes an error.

I know I could get this job done with more than one function (overloading),
but humor me on this one please.  I think I've missed a simple point in my
learning.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019