hackingcpp / comments

Comments regarding hackingcpp.com
1 stars 0 forks source link

cpp/std/sequence_containers #29

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

C++ Standard Library Sequence Containers | hacking C++

Overview of C++'s standard sequence

https://hackingcpp.com/cpp/std/sequence_containers.html

nicolgo commented 1 year ago

Is there the "queue" and "stack" container adaptor cheatsheet?

lkh1726029674 commented 1 year ago

std::vector a {4,7,1,9}; std::vector b {1,2,3}; bool equal1 = (a == b); // false a = b; // copy assignment ⇒ b: 4719 bool equal2 = (a == b); // true a[0] = 3; // a: 3719 b: 4719 bool equal3 = (a == b); // false

The 3rd row should be b = a . I really don't understand why b is 4719.

lkh1726029674 commented 1 year ago

The 4th row should be b = a .