Click here to Skip to main content
15,917,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
Stephen Hewitt2-Jul-08 21:51
Stephen Hewitt2-Jul-08 21:51 
QuestionRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
Chesnokov Yuriy2-Jul-08 22:04
professionalChesnokov Yuriy2-Jul-08 22:04 
AnswerRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
Stephen Hewitt2-Jul-08 22:09
Stephen Hewitt2-Jul-08 22:09 
GeneralRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
CPallini2-Jul-08 22:19
mveCPallini2-Jul-08 22:19 
QuestionRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
Chesnokov Yuriy2-Jul-08 22:34
professionalChesnokov Yuriy2-Jul-08 22:34 
AnswerRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
Stephen Hewitt2-Jul-08 22:37
Stephen Hewitt2-Jul-08 22:37 
AnswerRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
Chesnokov Yuriy2-Jul-08 23:05
professionalChesnokov Yuriy2-Jul-08 23:05 
GeneralRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
Stephen Hewitt6-Jul-08 14:56
Stephen Hewitt6-Jul-08 14:56 
This works fine for me:
// StraightC.cpp : Defines the entry point for the console application.
//
 
#include "stdafx.h"
 
struct BB;
 
struct AA
{
	struct BB* bb;
	int a;
};
 
struct BB
{
	struct AA* aa;
	int b;
};
 
void main()
{
	struct AA a;
	struct BB b;
	a.bb = &b;
	b.aa = &a;
	a.bb->b = 1;
	b.aa->a = 3;
} 


Steve

AnswerRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
Iain Clarke, Warrior Programmer2-Jul-08 22:24
Iain Clarke, Warrior Programmer2-Jul-08 22:24 
GeneralRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
CPallini2-Jul-08 22:28
mveCPallini2-Jul-08 22:28 
QuestionRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
Chesnokov Yuriy2-Jul-08 22:38
professionalChesnokov Yuriy2-Jul-08 22:38 
AnswerRe: How to struct AA{ struct BB; }; struct BB { struct AA; }; Pin
Iain Clarke, Warrior Programmer2-Jul-08 22:49
Iain Clarke, Warrior Programmer2-Jul-08 22:49 
GeneralOT Pin
CPallini2-Jul-08 23:06
mveCPallini2-Jul-08 23:06 
QuestionHelp with CTabCtrl Pin
rbmarasigan20012-Jul-08 20:42
rbmarasigan20012-Jul-08 20:42 
AnswerRe: Help with CTabCtrl Pin
Iain Clarke, Warrior Programmer2-Jul-08 22:39
Iain Clarke, Warrior Programmer2-Jul-08 22:39 
QuestionGPL Pin
Dennis L2-Jul-08 20:35
Dennis L2-Jul-08 20:35 
AnswerRe: GPL Pin
Hamid_RT2-Jul-08 21:31
Hamid_RT2-Jul-08 21:31 
GeneralRe: GPL Pin
Dennis L2-Jul-08 21:54
Dennis L2-Jul-08 21:54 
AnswerRe: GPL - and bullying hippy teachers. Pin
Iain Clarke, Warrior Programmer2-Jul-08 23:20
Iain Clarke, Warrior Programmer2-Jul-08 23:20 
Questionheader-files Pin
testcrap2-Jul-08 20:03
testcrap2-Jul-08 20:03 
AnswerRe: header-files Pin
Stephen Hewitt2-Jul-08 20:13
Stephen Hewitt2-Jul-08 20:13 
GeneralRe: header-files Pin
Stephen Hewitt2-Jul-08 21:04
Stephen Hewitt2-Jul-08 21:04 
GeneralRe: header-files Pin
Iain Clarke, Warrior Programmer2-Jul-08 23:21
Iain Clarke, Warrior Programmer2-Jul-08 23:21 
AnswerRe: header-files Pin
Stephen Hewitt2-Jul-08 20:22
Stephen Hewitt2-Jul-08 20:22 
GeneralRe: header-files Pin
testcrap2-Jul-08 20:39
testcrap2-Jul-08 20:39 

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.