CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Lindley

Search: Search took 1.37 seconds.

  1. Replies
    23
    Views
    20,146

    Re: allocating bidimensional matrix

    When you need a matrix of dynamic size which won't *change* size often, you should consider using boost::multi_array.
  2. Replies
    23
    Views
    20,146

    Re: allocating bidimensional matrix

    Just for fun: realloc() can be used in place of free() by specifying a new size of 0.
  3. Replies
    23
    Views
    20,146

    Re: allocating bidimensional matrix

    A good reason, right up until you realize that std::vector::resize() is C++'s answer to realloc----plus it makes things even easier by completely hiding the fact that you're working with dynamic...
  4. Replies
    23
    Views
    20,146

    Re: allocating bidimensional matrix

    realloc behaves like malloc if its first argument is NULL.

    I would advise using a vector<string> for this problem.
Results 1 to 4 of 4





Click Here to Expand Forum to Full Width

Featured