Click here to Skip to main content
15,915,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Mouse position Pin
Anonymous4-Oct-02 7:54
Anonymous4-Oct-02 7:54 
GeneralCOleSafeArray::PutElement Pin
Kash4-Oct-02 5:58
Kash4-Oct-02 5:58 
GeneralRe: COleSafeArray::PutElement Pin
Ranjan Banerji4-Oct-02 8:50
Ranjan Banerji4-Oct-02 8:50 
QuestionHow to capture mouse movement with a derived base class Pin
work_to_live4-Oct-02 5:40
work_to_live4-Oct-02 5:40 
AnswerRe: How to capturing mouse movement with a derived base class Pin
Tomasz Sowinski4-Oct-02 5:51
Tomasz Sowinski4-Oct-02 5:51 
GeneralRe: How to capturing mouse movement with a derived base class Pin
work_to_live4-Oct-02 7:07
work_to_live4-Oct-02 7:07 
Generalproblem with CPtrArray Pin
Tom Putzeys4-Oct-02 5:29
sussTom Putzeys4-Oct-02 5:29 
GeneralRe: problem with CPtrArray Pin
Pavel Klocek4-Oct-02 6:34
Pavel Klocek4-Oct-02 6:34 
The CArray is a dynamic array. If you add data to it and the currently allocated memory is already full, the storage is reallocated and the data are copied to the new memory (using copy constructors for classes).

Because you have not specified the length of the array in advance, the initial length was only 1 and the array was reallocated before inserting the second item - so your first pointer points to nowhere => it's wrong to use pointers to container data this way.

Also it is good practice to allocate the array using SetSize(), if you know the required size in advance.




Pavel
Sonork 100.15206
GeneralStored Procedures in DAO Pin
SamirSood4-Oct-02 5:22
SamirSood4-Oct-02 5:22 
Generalfind remote machine mac address Pin
Anonymous4-Oct-02 5:23
Anonymous4-Oct-02 5:23 
GeneralRe: find remote machine mac address Pin
Andreas Saurwein4-Oct-02 5:37
Andreas Saurwein4-Oct-02 5:37 
GeneralRe: find remote machine mac address Pin
Scott H. Settlemier4-Oct-02 5:51
Scott H. Settlemier4-Oct-02 5:51 
QuestionISO and UDF source? Pin
chen4-Oct-02 5:16
chen4-Oct-02 5:16 
AnswerRe: ISO and UDF source? Pin
Andreas Saurwein4-Oct-02 5:57
Andreas Saurwein4-Oct-02 5:57 
Questionhow to simulate an animal's random movement Pin
wangnanjing4-Oct-02 5:10
wangnanjing4-Oct-02 5:10 
AnswerRe: how to simulate an animal's random movement Pin
Scott H. Settlemier4-Oct-02 5:20
Scott H. Settlemier4-Oct-02 5:20 
GeneralRe: how to simulate an animal's random movement Pin
wangnanjing4-Oct-02 5:19
wangnanjing4-Oct-02 5:19 
GeneralRe: how to simulate an animal's random movement Pin
Scott H. Settlemier4-Oct-02 5:43
Scott H. Settlemier4-Oct-02 5:43 
AnswerRe: how to simulate an animal's random movement Pin
Andreas Saurwein4-Oct-02 5:30
Andreas Saurwein4-Oct-02 5:30 
GeneralCDialogBar Pin
lucy4-Oct-02 5:05
lucy4-Oct-02 5:05 
GeneralRe: CDialogBar Pin
Tomasz Sowinski4-Oct-02 5:16
Tomasz Sowinski4-Oct-02 5:16 
GeneralRe: CDialogBar Pin
lucy4-Oct-02 5:36
lucy4-Oct-02 5:36 
GeneralRe: CDialogBar Pin
Tomasz Sowinski4-Oct-02 5:48
Tomasz Sowinski4-Oct-02 5:48 
GeneralRe: CDialogBar Pin
lucy4-Oct-02 5:46
lucy4-Oct-02 5:46 
GeneralRe: CDialogBar Pin
Tomasz Sowinski4-Oct-02 5:59
Tomasz Sowinski4-Oct-02 5:59 

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.