Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Memory Allocation Error 998 Pin
ky_rerun25-Feb-09 16:25
ky_rerun25-Feb-09 16:25 
GeneralRe: Memory Allocation Error 998 Pin
Richard Andrew x6425-Feb-09 16:30
professionalRichard Andrew x6425-Feb-09 16:30 
AnswerRe: Memory Allocation Error 998 Pin
User 268325825-Feb-09 19:39
User 268325825-Feb-09 19:39 
QuestionForward Declarations, Inheritance and Circular dependancies Pin
thelonesquirrely25-Feb-09 10:19
thelonesquirrely25-Feb-09 10:19 
AnswerRe: Forward Declarations, Inheritance and Circular dependancies Pin
Jonathan Davies25-Feb-09 10:41
Jonathan Davies25-Feb-09 10:41 
GeneralRe: Forward Declarations, Inheritance and Circular dependancies Pin
thelonesquirrely25-Feb-09 10:54
thelonesquirrely25-Feb-09 10:54 
AnswerRe: Forward Declarations, Inheritance and Circular dependancies Pin
led mike25-Feb-09 11:55
led mike25-Feb-09 11:55 
AnswerRe: Forward Declarations, Inheritance and Circular dependancies Pin
Stuart Dootson25-Feb-09 11:59
professionalStuart Dootson25-Feb-09 11:59 
I compiled a large subset of the code you supplied in gcc 4.0.1 and found the following issues:

  1. In the Task constructor, you attempt to convert a const pointer to a non-const pointer - that's a no-no.
  2. In TaskQueue.h, you effectively have two forward declarations of MessageHandler (one in TaskQueue.h, one from #including Tasks.h) - that's not allowed, so remove the one in TaskQueue.h - you always #include Tasks.h, so you know you'll have the forward declaration from there.
  3. Again, in TaskQueue::setMessageHandler, you are converting a const pointer to a non-const pointer
  4. You forward declared MessageHandler in TaskQueue.h - therefore, you do not know what methods MessageHandler has, so you can't call them in the header (as you've done in TaskQueue::doSomething). You can only call them after you've got a complete declaration of MessageHandler (i.e. in a TaskQueue.C, after you've #included MessageHandler.h)
  5. You use '&this' in the MessageHandler constructor - this will give a MessageHandler**, as 'this' is a MessageHandler*
  6. Your Task class isn't terminated with a semi-colon. This *can* cause torrents of incomprehensible error messages...


Fix them and I suspect your compilation problems may go away.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Forward Declarations, Inheritance and Circular dependancies Pin
thelonesquirrely25-Feb-09 13:02
thelonesquirrely25-Feb-09 13:02 
QuestionError creating an object based on a dialog declared in a .rc resource file Pin
Goo225-Feb-09 9:49
Goo225-Feb-09 9:49 
AnswerRe: Error creating an object based on a dialog declared in a .rc resource file Pin
Jonathan Davies25-Feb-09 10:10
Jonathan Davies25-Feb-09 10:10 
GeneralRe: Error creating an object based on a dialog declared in a .rc resource file Pin
Goo225-Feb-09 11:49
Goo225-Feb-09 11:49 
GeneralRe: Error creating an object based on a dialog declared in a .rc resource file Pin
Goo225-Feb-09 12:45
Goo225-Feb-09 12:45 
GeneralRe: Error creating an object based on a dialog declared in a .rc resource file Pin
Jonathan Davies25-Feb-09 14:16
Jonathan Davies25-Feb-09 14:16 
QuestionHow can I access CView within CDoc in a SDI? Pin
Joseph Marzbani25-Feb-09 9:41
Joseph Marzbani25-Feb-09 9:41 
AnswerRe: How can I access CView within CDoc in a SDI? Pin
Jonathan Davies25-Feb-09 10:30
Jonathan Davies25-Feb-09 10:30 
AnswerRe: How can I access CView within CDoc in a SDI? Pin
«_Superman_»25-Feb-09 17:41
professional«_Superman_»25-Feb-09 17:41 
AnswerRe: How can I access CView within CDoc in a SDI? Pin
Hamid_RT25-Feb-09 19:43
Hamid_RT25-Feb-09 19:43 
AnswerRe: How can I access CView within CDoc in a SDI? Pin
Iain Clarke, Warrior Programmer26-Feb-09 1:54
Iain Clarke, Warrior Programmer26-Feb-09 1:54 
QuestionHow to resolve LNK2001 error (ver: VC ++ 8.0 and .net 2005) Pin
SIJUTHOMASP25-Feb-09 9:14
professionalSIJUTHOMASP25-Feb-09 9:14 
AnswerRe: How to resolve LNK2001 error (ver: VC ++ 8.0 and .net 2005) Pin
ky_rerun25-Feb-09 16:21
ky_rerun25-Feb-09 16:21 
GeneralRe: How to resolve LNK2001 error (ver: VC ++ 8.0 and .net 2005) Pin
SIJUTHOMASP26-Feb-09 3:15
professionalSIJUTHOMASP26-Feb-09 3:15 
AnswerRe: How to resolve LNK2001 error (ver: VC ++ 8.0 and .net 2005) Pin
SIJUTHOMASP26-Feb-09 8:59
professionalSIJUTHOMASP26-Feb-09 8:59 
Questionwindows message - when the window was displayed Pin
daavena25-Feb-09 8:18
daavena25-Feb-09 8:18 
AnswerRe: windows message - when the window was displayed Pin
Stuart Dootson25-Feb-09 8:29
professionalStuart Dootson25-Feb-09 8:29 

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.