pittenger-laurence@cs.yale.edu (Laurence Arthur Pittenger) (05/04/91)
Two questions for all you think C users: 1. in the "fake" object orientation (ie C+-) I'm having trouble with what should be a simple command. I have a method in an object which I want to call on itself. Since this method is sometimes called by its children, which have their own implementation of the method, I can't use a straightforward this->method() call, since this would, in the case of the children, call the wrong implementation. So, and judging from the documentation this should work, I call myObject::Method(). The compiler gives me a compile-time error of "Invalid method call" (or something approximating that msg). WHY? [I posted this earlier and the only response I got suggested it might be a 'corrupt project'. This, however, was not the case. Maybe my last post was poorly worded.] 2. To check for bad pointers, I often debug by calling the repetative trace option (command-trace) in the debugger. By flipping back and forth on every command I often find bad pointers which I would otherwise miss. (the extra work uses extra memory which means if I corrupt something there's a greater likelyhood of finding it). Recently, I've started getting an "Application has suddenly quit. (28)" (paraphrase) error. System error 28 is st to the effect of application memory running into the stack. Is this error merely a function of the fact that I'm doing all the extra switching back and forth w/ the debugger, or is it something legitimately wrong with my code, which works fine when I merely run it (no tracing)? (Or, maybe, is it related to question 1?) Thanks in advance, LP -- Laurence A. Pittenger CSNET : pittenger-laurence@cs.yale.edu BITNET : pitlaua@yalevm , pittenger-laurence@yalecs