You cannot have a vector of references the same way you cannot have an array of references.
– DeiDeiOct 05 '17 at 11:40
Just like you can't have a reference to a reference you also cannot have a container of references,
– NathanOliverOct 05 '17 at 11:42
I suspect that you believe that C++ references are like references in some other languages, like Java, C#, or Python. The only thing they really have in common is the name.
– molbdniloOct 05 '17 at 11:51
1 Answers1
2
vector doesn't support reference. you might use std::reference_wrapper or pointers instead.