Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    Accessing beyond the end of an array is not guaranteed to cause an error. If you're lucky, the program will just crash. You're definitely in the realm of undefined behavior. Commented Jun 1, 2009 at 21:18
  • True, although the purpose of this example is really just to show how to use typedef and new together to declare a 2D array. Commented Jun 1, 2009 at 21:22
  • 1
    I seriously liked your answer too much. I myself had been an advocator of typedef. Commented Apr 18, 2016 at 6:28