Click here to Skip to main content
15,913,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: handle passing problem... Pin
J. Dunlap3-Oct-03 19:46
J. Dunlap3-Oct-03 19:46 
GeneralRe: handle passing problem... Pin
R. Thomas3-Oct-03 19:55
R. Thomas3-Oct-03 19:55 
GeneralRe: handle passing problem... Pin
J. Dunlap3-Oct-03 21:17
J. Dunlap3-Oct-03 21:17 
GeneralRe: handle passing problem... Pin
R. Thomas4-Oct-03 6:45
R. Thomas4-Oct-03 6:45 
GeneralRe: handle passing problem... Pin
J. Dunlap4-Oct-03 16:47
J. Dunlap4-Oct-03 16:47 
GeneralCXImage Printing Pin
radha vijay3-Oct-03 10:34
radha vijay3-Oct-03 10:34 
GeneralPrinting in vc++ Pin
radha vijay3-Oct-03 10:32
radha vijay3-Oct-03 10:32 
QuestionIs it me or is it the compiler? Pin
Ravi Bhavnani3-Oct-03 10:24
professionalRavi Bhavnani3-Oct-03 10:24 
I have an abstract base class CFoo that contains a pure virtual method void setDefault() as well as a public static method void doSomething(), like so:
class CFoo {
  public:
    // Construction/destruction
    CFoo()
      { setDefault(); }
    virtual ~CFoo()
      {}

    // Subclasses must implement this
    virtual void setDefault() = 0;

    // A public static method
    static void doSomething() {
       int x = 0;
       x = 32;
    }
}
One of CFoo's clients does this:
CFoo::doSomething();
which causes VC6's linker to complain that CFoo::setDefault() is not implemented. It's as if the compiler wants to construct a CFoo object (which makes no sense since it's an abstract base class).

Is it me or VC6? (It's probably me, but I can't figure out what I'm doing wrong). Frown | :(

/ravi

Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com

AnswerRe: Is it me or is it the compiler? Pin
Orhun Birsoy3-Oct-03 10:37
Orhun Birsoy3-Oct-03 10:37 
GeneralRe: Is it me or is it the compiler? Pin
Ravi Bhavnani3-Oct-03 10:42
professionalRavi Bhavnani3-Oct-03 10:42 
GeneralRe: Is it me or is it the compiler? Pin
Peter Weyzen3-Oct-03 11:26
Peter Weyzen3-Oct-03 11:26 
GeneralRe: Is it me or is it the compiler? Pin
Ravi Bhavnani3-Oct-03 12:18
professionalRavi Bhavnani3-Oct-03 12:18 
AnswerRe: Is it me or is it the compiler? Pin
Michael Dunn3-Oct-03 13:06
sitebuilderMichael Dunn3-Oct-03 13:06 
GeneralRe: Is it me or is it the compiler? Pin
Ravi Bhavnani3-Oct-03 13:17
professionalRavi Bhavnani3-Oct-03 13:17 
GeneralRe: Is it me or is it the compiler? Pin
Michael Dunn3-Oct-03 14:26
sitebuilderMichael Dunn3-Oct-03 14:26 
GeneralRe: Is it me or is it the compiler? Pin
Ravi Bhavnani4-Oct-03 6:11
professionalRavi Bhavnani4-Oct-03 6:11 
GeneralRe: Is it me or is it the compiler? Pin
peterchen3-Oct-03 20:32
peterchen3-Oct-03 20:32 
GeneralRe: Is it me or is it the compiler? Pin
Ravi Bhavnani4-Oct-03 6:13
professionalRavi Bhavnani4-Oct-03 6:13 
GeneralWeird VC++ behaviour Pin
DaFrawg3-Oct-03 9:45
DaFrawg3-Oct-03 9:45 
GeneralRe: Weird VC++ behaviour Pin
Michael P Butler3-Oct-03 10:00
Michael P Butler3-Oct-03 10:00 
GeneralRe: Weird VC++ behaviour Pin
DaFrawg10-Oct-03 8:42
DaFrawg10-Oct-03 8:42 
GeneralRe: Weird VC++ behaviour Pin
Michael P Butler10-Oct-03 9:03
Michael P Butler10-Oct-03 9:03 
GeneralRe: Weird VC++ behaviour Pin
DaFrawg27-Oct-03 2:05
DaFrawg27-Oct-03 2:05 
GeneralRe: Weird VC++ behaviour Pin
David Crow3-Oct-03 10:07
David Crow3-Oct-03 10:07 
GeneralRe: Weird VC++ behaviour Pin
DaFrawg4-Oct-03 2:23
DaFrawg4-Oct-03 2:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.