Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Very difficult problem about CExplorer1. Pin
virusest31-Dec-10 18:13
virusest31-Dec-10 18:13 
Questionmatrix in window Pin
kiemxai6-May-09 14:45
kiemxai6-May-09 14:45 
AnswerRe: matrix in window Pin
Stuart Dootson6-May-09 19:41
professionalStuart Dootson6-May-09 19:41 
GeneralRe: matrix in window Pin
kiemxai6-May-09 23:19
kiemxai6-May-09 23:19 
GeneralRe: matrix in window Pin
Stuart Dootson6-May-09 23:22
professionalStuart Dootson6-May-09 23:22 
QuestionInclude order issues Pin
__DanC__6-May-09 9:53
__DanC__6-May-09 9:53 
AnswerRe: Include order issues Pin
Stuart Dootson6-May-09 10:40
professionalStuart Dootson6-May-09 10:40 
GeneralRe: Include order issues Pin
__DanC__6-May-09 11:00
__DanC__6-May-09 11:00 
Thanks, that makes sense. I hadn't looked at it that simply until I saw that.

What would be the "standard" way of creating member variables that reference each other, using your example:

// a.h

#include "b.h"

class B;

class A
{
   // Stuff
   B *b;

   CString s1;
};


// b.h

#include "a.h"

class A;

class B
{
   // Stuff
   A *a;

   CString s2;
};


That would work now I've used a forward declaration of the class and used a pointer but it seems "messy" to me to have one class as a pointer and the other not. It also seems a waste to have to implement a destructor to clean up the pointers.
GeneralRe: Include order issues Pin
Stuart Dootson6-May-09 11:14
professionalStuart Dootson6-May-09 11:14 
GeneralRe: Include order issues Pin
__DanC__6-May-09 21:06
__DanC__6-May-09 21:06 
Questionhelp extracting data Pin
dunlapjw6-May-09 7:42
dunlapjw6-May-09 7:42 
AnswerRe: help extracting data Pin
Madhu Nair6-May-09 8:41
Madhu Nair6-May-09 8:41 
QuestionRe: help extracting data Pin
David Crow6-May-09 8:42
David Crow6-May-09 8:42 
QuestionByte alignement - qt Pin
yaronillouz6-May-09 7:21
yaronillouz6-May-09 7:21 
AnswerRe: Byte alignement - qt Pin
Stuart Dootson6-May-09 8:31
professionalStuart Dootson6-May-09 8:31 
GeneralRe: Byte alignement - qt Pin
yaronillouz6-May-09 19:04
yaronillouz6-May-09 19:04 
GeneralRe: Byte alignement - qt Pin
Stuart Dootson6-May-09 19:35
professionalStuart Dootson6-May-09 19:35 
QuestionDocument/View Problem Pin
nick2reg6-May-09 6:30
nick2reg6-May-09 6:30 
AnswerRe: Document/View Problem Pin
Iain Clarke, Warrior Programmer6-May-09 7:00
Iain Clarke, Warrior Programmer6-May-09 7:00 
GeneralRe: Document/View Problem Pin
nick2reg6-May-09 8:08
nick2reg6-May-09 8:08 
AnswerRe: Document/View Problem Pin
Stuart Dootson6-May-09 7:01
professionalStuart Dootson6-May-09 7:01 
GeneralRe: Document/View Problem Pin
nick2reg6-May-09 8:10
nick2reg6-May-09 8:10 
AnswerRe: Document/View Problem Pin
David Crow6-May-09 8:48
David Crow6-May-09 8:48 
QuestionAssignment of read only location, class with const method trying to write to private member variable [modified] Pin
jeweladdict6-May-09 6:25
jeweladdict6-May-09 6:25 
AnswerRe: Assignment of read only location, class with const method trying to write to private member variable Pin
Stuart Dootson6-May-09 6:48
professionalStuart Dootson6-May-09 6:48 

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.