Click here to Skip to main content
15,908,909 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Locale Pin
David Crow15-Apr-03 4:48
David Crow15-Apr-03 4:48 
GeneralRe: Locale Pin
vcseeker15-Apr-03 17:30
vcseeker15-Apr-03 17:30 
GeneralIn over my head - Rookie needs a clue Pin
CantFindMind14-Apr-03 15:20
CantFindMind14-Apr-03 15:20 
GeneralRe: In over my head - Rookie needs a clue Pin
Ravi Bhavnani14-Apr-03 18:06
professionalRavi Bhavnani14-Apr-03 18:06 
QuestionRLE24??? Pin
alex.barylski14-Apr-03 14:34
alex.barylski14-Apr-03 14:34 
AnswerRe: RLE24??? Pin
Joe Woodbury14-Apr-03 15:23
professionalJoe Woodbury14-Apr-03 15:23 
AnswerRe: RLE24??? Pin
Chris Losinger14-Apr-03 15:27
professionalChris Losinger14-Apr-03 15:27 
GeneralHELP!!! can not read memory... threads Pin
(Steven Hicks)n+114-Apr-03 13:00
(Steven Hicks)n+114-Apr-03 13:00 
GeneralRe: HELP!!! can not read memory... threads Pin
Tim Smith14-Apr-03 13:47
Tim Smith14-Apr-03 13:47 
GeneralRe: HELP!!! can not read memory... threads Pin
(Steven Hicks)n+115-Apr-03 10:17
(Steven Hicks)n+115-Apr-03 10:17 
GeneralRe: HELP!!! can not read memory... threads Pin
valikac14-Apr-03 14:45
valikac14-Apr-03 14:45 
GeneralRe: HELP!!! can not read memory... threads Pin
(Steven Hicks)n+115-Apr-03 10:20
(Steven Hicks)n+115-Apr-03 10:20 
GeneralCheck Menu Pin
Selevercin14-Apr-03 12:47
Selevercin14-Apr-03 12:47 
GeneralRe: Check Menu Pin
Miszou14-Apr-03 13:11
Miszou14-Apr-03 13:11 
GeneralRe: Check Menu Pin
Selevercin14-Apr-03 13:43
Selevercin14-Apr-03 13:43 
GeneralRe: Check Menu Pin
Miszou14-Apr-03 13:53
Miszou14-Apr-03 13:53 
GeneralRe: Check Menu Pin
Selevercin15-Apr-03 13:23
Selevercin15-Apr-03 13:23 
GeneralMulti-dimensional Arrays Pin
ed114-Apr-03 11:47
ed114-Apr-03 11:47 
GeneralRe: Multi-dimensional Arrays Pin
Joe Woodbury14-Apr-03 11:57
professionalJoe Woodbury14-Apr-03 11:57 
GeneralRe: Multi-dimensional Arrays Pin
Dave Bryant14-Apr-03 12:01
Dave Bryant14-Apr-03 12:01 
Since you are storing an array of objects, rather than an array of pointers, the objects will be copied into the array. This means that C++ uses the autogenerated assignment operator for STest. However, the CArray template class disables both the copy constructor and the assignment operator, therefore disabling simple copies of the array.

There are a number of solutions for this. Here's a few:

1) Store STest pointers in the outer array instead of objects. This means that only the pointers are copied rather than the entire object (and hence the inner CArray is not copied). This means that the objects must be allocated and deallocated manually on the heap.

2) Use std::vector instead of CArray. This is much better implementation overall, and does not have the copying limitation either.

BTW, when posting on codeproject, use &lt; and &gt; instead of < and >, otherwise they look like HTML tags and so are not displayed.

Dave
http://www.cloudsofheaven.org
GeneralRe: Multi-dimensional Arrays Pin
(Steven Hicks)n+114-Apr-03 12:52
(Steven Hicks)n+114-Apr-03 12:52 
GeneralImage recording Pin
alex.barylski14-Apr-03 11:04
alex.barylski14-Apr-03 11:04 
GeneralRe: Image recording Pin
Jack Handy14-Apr-03 11:26
Jack Handy14-Apr-03 11:26 
GeneralRe: Image recording Pin
alex.barylski14-Apr-03 11:49
alex.barylski14-Apr-03 11:49 
GeneralRe: Image recording Pin
J. Dunlap14-Apr-03 11:40
J. Dunlap14-Apr-03 11:40 

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.