-
Notifications
You must be signed in to change notification settings - Fork 13.3k
the book should mention the difference between vectors and arrays. #20948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Arrays are allocated directly within the containing structure. So |
Let me summarize it here: So unless we box the array declaration, arrays would be allocated on the stack, whereas vectors would always be allocated on the heap (possibly because they are implemented as box types in |
Yes. |
I have found out that vectors are heap allocated whereas arrays are stack allocated, but this was not mentioned anywhere in the book.
The text was updated successfully, but these errors were encountered: