Thread: Dynamic memory allocation

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    Quote Originally Posted by Elysia View Post
    If you need a fixed-length array, you should be using std::tr1::array instead!
    Of course, it isn't dynamic and must be determined at compile time.
    And if it isn't determined at compile time, it's dynamic!
    Um, I was talking about variable-length arrays

    edit:
    like the original poster's question.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by FillYourBrain View Post
    Um, I was talking about variable-length arrays

    edit:
    like the original poster's question.
    So you say, but you also mentioned:
    That's easy. Using an array is cleaner. It acts like a fixed length array. Why dynamically allocate inside a vector?
    An array acts like fixed, and vector does not?
    I don't see the difference!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  2. Replies: 16
    Last Post: 01-01-2008, 04:07 PM
  3. Dynamic memory allocation.
    By HAssan in forum C Programming
    Replies: 3
    Last Post: 09-07-2006, 05:04 PM
  4. Dynamic memory allocation...
    By dicorr in forum C Programming
    Replies: 1
    Last Post: 06-24-2006, 03:59 AM
  5. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM