Article View: comp.os.os2.programmer
Article #118Problems with GCC virtual Functions
From: Todd J Dukes
Date: Mon, 02 Nov 1992 13:15
Date: Mon, 02 Nov 1992 13:15
34 lines
1319 bytes
1319 bytes
I am using the GCC 2.2.2 from hobbes.
Starting with the sample3 program included in the GCC samples
file I wrote a class for a window object. I included 4 extra bytes
in the window words of the window. I placed a pointer to the object
in the window words.
The window function gets this pointer from the window words with the
WinQueryWindowPtr function and the calls a member function of the window
object. Example
MRESULT EXPENTRY WinFunc(...)
{
WindowClass * pwc;
pwc = WinQueryWindowPtr(...);
return pwc->ClassWinFunc(...);
}
I've used ... instead of arguments for brevity.
So far, it worked.
Then I went back on changed the member function ClassWinFunc() to
virtual. Now, the program gives a 3175 error.
Has anyone else experienced anything like this?
Any suggestions?
Thanks,
Todd
tdukes@eng.auburn.edu
(205)826-8865
Technical Details
Message-ID:
<tdukes.921102071530@alva.ee.eng.auburn.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!news.duc.auburn.edu!eng.auburn.edu!tdukesShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!news.duc.auburn.edu!eng.auburn.edu!tdukes From: tdukes@eng.auburn.edu (Todd J Dukes) Newsgroups: comp.os.os2.programmer Subject: Problems with GCC virtual Functions Message-ID: <tdukes.921102071530@alva.ee.eng.auburn.edu> Date: 2 Nov 92 13:15:30 GMT Sender: usenet@news.duc.auburn.edu (News Account) Organization: Auburn University Engineering Lines: 34 Nntp-Posting-Host: alva.ee.eng.auburn.edu