Click here to Skip to main content
16,004,505 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to delete arrays to save memery space c++ Pin
Rajesh R Subramanian3-May-10 8:50
professionalRajesh R Subramanian3-May-10 8:50 
GeneralRe: how to delete arrays to save memery space c++ Pin
CPallini3-May-10 8:18
mveCPallini3-May-10 8:18 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1233-May-10 8:35
mrby1233-May-10 8:35 
GeneralRe: how to delete arrays to save memery space c++ Pin
Rajesh R Subramanian3-May-10 8:52
professionalRajesh R Subramanian3-May-10 8:52 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1233-May-10 9:07
mrby1233-May-10 9:07 
GeneralRe: how to delete arrays to save memery space c++ Pin
CPallini3-May-10 9:00
mveCPallini3-May-10 9:00 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1233-May-10 9:21
mrby1233-May-10 9:21 
GeneralRe: how to delete arrays to save memery space c++ Pin
David Crow3-May-10 9:30
David Crow3-May-10 9:30 
mrby123 wrote:
But now I got tim_var[1000][6]


Have you tried:

float **tim_var;
  
tim_var = new float*[1000]; <<----------
                                       |
for (int x = 0; x < 1000; x++)         |
{                                      |
    tim_var[x] = new float[6]; <<----- |
                                     | | 
    for (int y = 0; y < 6; y++)      | |
        tim_var[x][y] = 0.0;         | |
}                                    | |
                                     | |
for (x = 0; x < 1000; x++)           | |
    delete [] tim_var[x]; <<---------- |
                                       |
delete [] tim_var; <<-------------------

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Man who follows car will be exhausted." - Confucius


GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1233-May-10 9:54
mrby1233-May-10 9:54 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 10:37
mrby1234-May-10 10:37 
GeneralRe: how to delete arrays to save memery space c++ Pin
David Crow5-May-10 2:40
David Crow5-May-10 2:40 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1235-May-10 10:37
mrby1235-May-10 10:37 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1235-May-10 11:07
mrby1235-May-10 11:07 
GeneralRe: how to delete arrays to save memery space c++ Pin
CPallini3-May-10 10:33
mveCPallini3-May-10 10:33 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 8:43
mrby1234-May-10 8:43 
GeneralRe: how to delete arrays to save memery space c++ Pin
CPallini4-May-10 9:05
mveCPallini4-May-10 9:05 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 9:16
mrby1234-May-10 9:16 
GeneralRe: how to delete arrays to save memery space c++ Pin
CPallini4-May-10 9:40
mveCPallini4-May-10 9:40 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 9:50
mrby1234-May-10 9:50 
GeneralRe: how to delete arrays to save memery space c++ Pin
CPallini4-May-10 10:25
mveCPallini4-May-10 10:25 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 10:53
mrby1234-May-10 10:53 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 10:33
mrby1234-May-10 10:33 
AnswerOpenMP dilemma Pin
Chesnokov Yuriy3-May-10 5:17
professionalChesnokov Yuriy3-May-10 5:17 
GeneralRe: OpenMP dilemma Pin
Chris Losinger3-May-10 5:39
professionalChris Losinger3-May-10 5:39 
GeneralRe: For critical sections, #pragma omp single can be used as barriers. Pin
Software_Developer3-May-10 6:09
Software_Developer3-May-10 6:09 

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.