Message-ID: <3AE082F7.B4E9C05@jps.net> From: Dennis Yelle 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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/