Click here to Skip to main content
15,926,703 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using an ActiveX located on a remote computer Pin
Jason Henderson19-Feb-03 7:09
Jason Henderson19-Feb-03 7:09 
GeneralSimple CRecordset question: Pin
SatyaDY19-Feb-03 0:55
SatyaDY19-Feb-03 0:55 
GeneralA C++ error Pin
Anonymous19-Feb-03 0:11
Anonymous19-Feb-03 0:11 
GeneralRe: A C++ error Pin
jhwurmbach19-Feb-03 1:02
jhwurmbach19-Feb-03 1:02 
GeneralNo dear Pin
Shah Shehpori19-Feb-03 1:17
sussShah Shehpori19-Feb-03 1:17 
GeneralRe: No dear Pin
Hans Ruck19-Feb-03 1:34
Hans Ruck19-Feb-03 1:34 
GeneralForwar declaration Pin
Alois Kraus19-Feb-03 4:49
Alois Kraus19-Feb-03 4:49 
GeneralRe: No dear Pin
Roger Allen19-Feb-03 2:18
Roger Allen19-Feb-03 2:18 
When the compiler is allocating the data space for class A, it needs to know the exact size of each of the objects that make it up. If you have a B sum; in class A's declaration, the compiler needs to know its exact size, which is currently not defined. This is an error. If it was declared as B* sum, the compiler knows the size of a pointer to an object, so can work out how big class A is going to be. This is OK.

If you still need to declare class A with a B sum then you will have to move the declration of class B before class A. But as you said in your original post, class B will be referencing class A in some way. If both do somthing like B sum and A total then one of your classes will have to use a pointer to the object otherwise you will not be able to get the code to compile due to a circular definition.


Roger Allen
Sonork 100.10016

Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
GeneralWM_GETMINMAXINFO Pin
Maurizio Pisano19-Feb-03 0:03
Maurizio Pisano19-Feb-03 0:03 
GeneralRe: WM_GETMINMAXINFO Pin
Brian Shifrin19-Feb-03 2:28
Brian Shifrin19-Feb-03 2:28 
GeneralGrouped Radio Button Control Pin
Andrew Hoole19-Feb-03 0:02
Andrew Hoole19-Feb-03 0:02 
GeneralRe: Grouped Radio Button Control Pin
HENDRIK R19-Feb-03 1:19
HENDRIK R19-Feb-03 1:19 
GeneralReplacing msctls_updown32 Pin
Brian Shifrin18-Feb-03 23:57
Brian Shifrin18-Feb-03 23:57 
GeneralRe: Replacing msctls_updown32 Pin
Maurizio Pisano19-Feb-03 0:09
Maurizio Pisano19-Feb-03 0:09 
GeneralRe: Replacing msctls_updown32 Pin
Brian Shifrin19-Feb-03 1:32
Brian Shifrin19-Feb-03 1:32 
GeneralRe: Replacing msctls_updown32 Pin
Maurizio Pisano19-Feb-03 19:14
Maurizio Pisano19-Feb-03 19:14 
GeneralReading AVI's using Visual C++ in WinXP Pin
Confused Kenny18-Feb-03 23:16
Confused Kenny18-Feb-03 23:16 
GeneralFirewall Pin
summo18-Feb-03 22:22
summo18-Feb-03 22:22 
GeneralScrolling Web Page Pin
jeremysay18-Feb-03 22:06
jeremysay18-Feb-03 22:06 
GeneralNetShareEnum question Pin
vlusardi18-Feb-03 21:39
vlusardi18-Feb-03 21:39 
Questionhow can i adjust dialog initial position? Pin
fogmen18-Feb-03 21:19
fogmen18-Feb-03 21:19 
AnswerRe: how can i adjust dialog initial position? Pin
Jon Hulatt18-Feb-03 21:54
Jon Hulatt18-Feb-03 21:54 
AnswerRe: how can i adjust dialog initial position? Pin
Iain Clarke, Warrior Programmer18-Feb-03 22:13
Iain Clarke, Warrior Programmer18-Feb-03 22:13 
GeneralAsk about EnableWindow(TRUE) and EnableWindow(FALSE) Pin
ooosawaddee318-Feb-03 21:06
ooosawaddee318-Feb-03 21:06 
GeneralRe: Ask about EnableWindow(TRUE) and EnableWindow(FALSE) Pin
HENDRIK R18-Feb-03 21:18
HENDRIK R18-Feb-03 21:18 

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.