KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I see this a lot: std::vector<Something> vec; do_something_with_vec(vec); Something *arr=&vec[0]; do_something_that_needs_carray(arr); I mean, a vector will probably use an array internally so I see why this works, I'm just wondering whether or not this is defined behavior (like, is an implementor allowed to run an implementation of std::vector with which this would break). If there are conflicts between the standards, I'm interested in what the C++11 standard says.
Tags (comma-separated)
Save Edits
Cancel