dyanmic array

This is a discussion on dyanmic array within the C++ Programming forums, part of the General Programming Boards category; how the dymnamic array num[] is declared for certain input integer say t?...

  1. #1
    Unregistered
    Guest

    dyanmic array

    how the dymnamic array num[] is declared for certain input integer say t?

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    6
    SOME_TYPE *myDynamicArray;
    int t;
    .
    .
    .
    myDynamicArray = new SOME_TYPE[t];
    .
    .
    .
    .
    delete [] myDynamicArray; // dont forget to deallocate your memory

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 05-29-2009, 08:25 PM
  2. from 2D array to 1D array
    By cfdprogrammer in forum C Programming
    Replies: 17
    Last Post: 03-24-2009, 11:33 AM
  3. Replies: 6
    Last Post: 11-09-2006, 03:28 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 10:54 AM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 08:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21