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.

Required fields*

4
  • Rule of thumb: don’t write C, if you want to write C++. Very special corner cases aside, usually std::vector or any other modern STL container is the way to go. Commented Oct 17, 2018 at 21:31
  • 1
    @Simon Is std::unique_ptr not C++? Commented Oct 17, 2018 at 21:56
  • unique_pte is, but C array is not. Commented Oct 18, 2018 at 4:26
  • 1
    @Simon A native array most certainly is C++. Using a std::array is necessary if you write generic code (native array of length zero is non-standard), or have to treat the whole array as a first-class-object. Otherwise, don't bother. Commented Oct 18, 2018 at 22:46