Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVC++ 6.0 + Processor Pack + Service Pack 5 cause stack overflow ? Pin
felixfan81925-May-09 21:57
felixfan81925-May-09 21:57 
QuestionHow to handle time delays Pin
V K 225-May-09 20:32
V K 225-May-09 20:32 
AnswerRe: How to handle time delays Pin
CPallini25-May-09 20:45
mveCPallini25-May-09 20:45 
AnswerRe: How to handle time delays Pin
Rajesh R Subramanian25-May-09 20:53
professionalRajesh R Subramanian25-May-09 20:53 
GeneralRe: How to handle time delays Pin
V K 225-May-09 20:54
V K 225-May-09 20:54 
GeneralRe: How to handle time delays Pin
CPallini25-May-09 20:59
mveCPallini25-May-09 20:59 
QuestionHelp on dynamic memory allocation and deallocation Pin
pani6825-May-09 20:08
pani6825-May-09 20:08 
AnswerRe: Help on dynamic memory allocation and deallocation Pin
«_Superman_»25-May-09 20:22
professional«_Superman_»25-May-09 20:22 
Method-2 is the right way to do it.
Method-1 would cause memory leaks as it only frees the array of integer pointers and not the integer locations.

I would recommend you use one of the standard C++ containers.
Here is an example -
vector<vector<int>> ii;
vector<int> i;

i.push_back(10);
i.push_back(20);
i.push_back(30);

ii.push_back(i);


To access the value 20, you would do ii[0][1] or you can use iterators.

«_Superman
I love work. It gives me something to do between weekends.

AnswerRe: Help on dynamic memory allocation and deallocation Pin
Cedric Moonen25-May-09 20:29
Cedric Moonen25-May-09 20:29 
AnswerRe: Help on dynamic memory allocation and deallocation Pin
Stuart Dootson25-May-09 23:08
professionalStuart Dootson25-May-09 23:08 
AnswerRe: Help on dynamic memory allocation and deallocation Pin
pani6826-May-09 2:15
pani6826-May-09 2:15 
QuestionHow do I convert .CPL to .MSC? Pin
Member 466633025-May-09 19:58
Member 466633025-May-09 19:58 
AnswerRe: How do I convert .CPL to .MSC? Pin
Stuart Dootson25-May-09 23:16
professionalStuart Dootson25-May-09 23:16 
GeneralRe: How do I convert .CPL to .MSC? Pin
Member 466633026-May-09 18:03
Member 466633026-May-09 18:03 
GeneralRe: How do I convert .CPL to .MSC? Pin
Stuart Dootson26-May-09 21:29
professionalStuart Dootson26-May-09 21:29 
GeneralRe: How do I convert .CPL to .MSC? Pin
Member 466633027-May-09 14:48
Member 466633027-May-09 14:48 
GeneralRe: How do I convert .CPL to .MSC? Pin
Stuart Dootson27-May-09 20:50
professionalStuart Dootson27-May-09 20:50 
GeneralRe: How do I convert .CPL to .MSC? Pin
Member 466633027-May-09 20:56
Member 466633027-May-09 20:56 
Question_variant_t Pin
vital_parsley200025-May-09 19:36
vital_parsley200025-May-09 19:36 
AnswerRe: _variant_t Pin
«_Superman_»25-May-09 19:42
professional«_Superman_»25-May-09 19:42 
GeneralRe: _variant_t Pin
vital_parsley200025-May-09 20:47
vital_parsley200025-May-09 20:47 
GeneralRe: _variant_t Pin
«_Superman_»25-May-09 21:51
professional«_Superman_»25-May-09 21:51 
GeneralRe: _variant_t Pin
vital_parsley200025-May-09 21:57
vital_parsley200025-May-09 21:57 
QuestionRe: _variant_t Pin
CPallini25-May-09 22:06
mveCPallini25-May-09 22:06 
GeneralRe: _variant_t Pin
Stuart Dootson26-May-09 0:45
professionalStuart Dootson26-May-09 0:45 

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.