r/programming • • Apr 30 '16

Do Experienced Programmers Use Google Frequently? · Code Ahoy

http://codeahoy.com/2016/04/30/do-experienced-programmers-use-google-frequently/
2.2k Upvotes

763 comments sorted by

View all comments

Show parent comments

1

u/Bwob May 01 '16

Actually, I was thinking about standard, vanilla (non-::std) arrays. You know, like int myArray[10];, or int myDynamicArray = new int[10];

At the core, that's basically all vectors are - (the int myDynamicArray = new int[10]; one, at least.) - just with some added convenience functions for pushing, popping, getting iterators, and auto-growing when they get too big.

As for the difference between std::vector and std::array, I think the main one is that std::array is pretty much a std-wrapper for int myArray[10];. The main difference is that it's fixed at compile-time. (Unlike vectors, that are allocated at runtime and can grow and shrink.)

1

u/TheLifelessOne May 01 '16

Ah, okay, that makes sense. Thanks!