A
Alex Vinokur
Why is not defined operator+ for vector?
For instance,
vector<T> v1, v2, v3;
T a;
v1=v2+a;
v1=v2+v3;
For instance,
vector<T> v1, v2, v3;
T a;
v1=v2+a;
v1=v2+v3;
Alex said:Why is not defined operator+ for vector?
For instance,
vector<T> v1, v2, v3;
T a;
v1=v2+a;
v1=v2+v3;
Concatenation of v2 and a.Jeff Schwab said:What would it mean?
Does this make v1 the concatenation of v2 and a, or the result of adding
a to each element of v2?
Concatenation of v2 and v3.Does this add each element of v2 to the corresponding element from v3,
or make v1 the concatenation of v2 and v3?
For instance,
vector<T> v1, v2, v3;
T a;
v1=v2+a;
v1=v2+v3;
Alex said:Concatenation of v2 and a. ....
Concatenation of v2 and v3.
Concatenation of v2 and a.
Concatenation of v2 and v3.
Jeff said:What would it mean?
Julie said:This is a weak argument.
There are plenty of methods/operators that are far
from intuitive.
Take vector::empty(), for example.
Without prior (stl) knowledge, there is no way to know what this means: does it
test for an empty condition or empty the contents of the vector?
Jeff said:It's not an argument. It's a question.
Take vector::empty(), for example.
Without prior (stl) knowledge, there is no way to know what this means: does it
test for an empty condition or empty the contents of the vector?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.