Click here to Skip to main content
15,923,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWord API - Insert page break after every hyperlink problem Pin
leemidgley27-Jan-04 7:05
leemidgley27-Jan-04 7:05 
Questiona CArray of structures containing other CArrays? Pin
b_girl27-Jan-04 6:26
b_girl27-Jan-04 6:26 
AnswerRe: a CArray of structures containing other CArrays? Pin
Diddy27-Jan-04 6:34
Diddy27-Jan-04 6:34 
GeneralRe: a CArray of structures containing other CArrays? Pin
b_girl27-Jan-04 6:49
b_girl27-Jan-04 6:49 
GeneralRe: a CArray of structures containing other CArrays? Pin
b_girl27-Jan-04 7:31
b_girl27-Jan-04 7:31 
GeneralRe: a CArray of structures containing other CArrays? Pin
Antti Keskinen27-Jan-04 7:57
Antti Keskinen27-Jan-04 7:57 
GeneralRe: a CArray of structures containing other CArrays? Pin
b_girl27-Jan-04 8:04
b_girl27-Jan-04 8:04 
GeneralRe: a CArray of structures containing other CArrays? Pin
Antti Keskinen27-Jan-04 9:35
Antti Keskinen27-Jan-04 9:35 
I think you should use it with both. So that the first TYPE is the struct's identifier, and the next is a reference to it. The default implementation uses a constant reference. They would e.g. become as

CArray< INV, INV& > INVArray;

For simple objects and members of the MFC collection, the usage of the class name only in the second parameter of CArray instantation works, because most of the classes have both copy constructors and operator= implemented. I believe you used a ready source code piece as an example of implementing it, and thus did not consider this issue.

Perhaps it works with this alteration. I am not sure, I'd need to test it myself to see what it says.. But this is pretty much as far as I can help you. Perhaps you should create a small test project just to create several structures with CArrays inside them and them fiddle about with them for a little to see how they work ?

-Antti Keskinen



----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: a CArray of structures containing other CArrays? Pin
Diddy27-Jan-04 10:47
Diddy27-Jan-04 10:47 
GeneralRe: a CArray of structures containing other CArrays? Pin
b_girl28-Jan-04 5:05
b_girl28-Jan-04 5:05 
GeneralRe: a CArray of structures containing other CArrays? Pin
Antti Keskinen28-Jan-04 6:52
Antti Keskinen28-Jan-04 6:52 
GeneralRe: a CArray of structures containing other CArrays? Pin
Diddy28-Jan-04 10:56
Diddy28-Jan-04 10:56 
GeneralRe: a CArray of structures containing other CArrays? Pin
b_girl29-Jan-04 3:41
b_girl29-Jan-04 3:41 
GeneralRe: a CArray of structures containing other CArrays? Pin
b_girl29-Jan-04 4:56
b_girl29-Jan-04 4:56 
AnswerRe: a CArray of structures containing other CArrays? Pin
toxcct27-Jan-04 8:43
toxcct27-Jan-04 8:43 
GeneralRe: a CArray of structures containing other CArrays? Pin
b_girl28-Jan-04 3:33
b_girl28-Jan-04 3:33 
AnswerRe: a CArray of structures containing other CArrays? Pin
Christian Graus27-Jan-04 9:40
protectorChristian Graus27-Jan-04 9:40 
GeneralError Program Pin
Member 64882827-Jan-04 6:14
Member 64882827-Jan-04 6:14 
GeneralRe: Error Program Pin
Steve S27-Jan-04 6:54
Steve S27-Jan-04 6:54 
GeneralRe: Error Program Pin
John R. Shaw27-Jan-04 8:53
John R. Shaw27-Jan-04 8:53 
QuestionHow to associate image with CStatic?? Pin
Dominik Reichl27-Jan-04 6:05
Dominik Reichl27-Jan-04 6:05 
Generalsmall design question C++/MFC Pin
Maximilien27-Jan-04 5:23
Maximilien27-Jan-04 5:23 
GeneralRe: small design question C++/MFC Pin
valikac27-Jan-04 6:14
valikac27-Jan-04 6:14 
GeneralExpression analysis Pin
Goh Hui Beng27-Jan-04 5:10
Goh Hui Beng27-Jan-04 5:10 
GeneralChoose language at runtime Pin
MyttO27-Jan-04 5:02
MyttO27-Jan-04 5:02 

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.