delorie.com/archives/browse.cgi | search |
Message-ID: | <3AE082F7.B4E9C05@jps.net> |
From: | Dennis Yelle <dennis51 AT jps DOT net> |
X-Mailer: | Mozilla 4.75 [en] (Win98; U) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Printing function pointers |
Lines: | 35 |
Date: | Fri, 20 Apr 2001 11:41:59 -0700 |
NNTP-Posting-Host: | 216.119.20.143 |
X-Complaints-To: | abuse AT onemain DOT com |
X-Trace: | nntp3.onemain.com 987791780 216.119.20.143 (Fri, 20 Apr 2001 14:36:20 EDT) |
NNTP-Posting-Date: | Fri, 20 Apr 2001 14:36:20 EDT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
I was surprised by the output from this program: --------------------- #include <iostream> int junk1() { return 111; } int junk2() { return 222; } int main() { if ( junk1 != junk2 ) { cout << "different\n"; } cout << junk1 << '\n'; cout << junk2 << '\n'; return 0; } ---------------------- I got this: ---------------- different 1 1 --------------- So, the function pointers are different, but they both print as 1. Is this expected, and desired behavior? Or is it a bug? Dennis Yelle -- I am a computer programmer and I am looking for a job. There is a link to my resume here: http://table.jps.net/~vert/
webmaster | delorie software privacy |
Copyright � 2019 by DJ Delorie | Updated Jul 2019 |