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.

7
  • 1
    This is not a good solution if I don't want to load STL because of memory constrains.
    – katta
    Commented Apr 19, 2017 at 16:01
  • 3
    @katta most nontrivial C++ programs do use STL anyway, so this is a good solution, just not for some minor number of cases including yours. Commented Mar 21, 2018 at 18:51
  • What I don't understand is why so many people think of the first index as the rows, and the second as the columns. Rebellion against XY coordinate diagrams in math class?
    – Dronz
    Commented May 15, 2018 at 3:29
  • 3
    @Dronz It's because that's the C++ memory model -- the columns are contiguous in memory, not the rows. In Fortran it's the other way. Commented Sep 29, 2018 at 19:20
  • @LeviMorrison Oh! That actually makes intuitive sense to me in this case, thanks! (I was thinking it was related to how many modern graphics coordinates use X and Y.)
    – Dronz
    Commented Sep 30, 2018 at 0:23