On Sep 4, 10:53 pm, Javier <jjeron...@gmail.comwrote:
Hello,
thanks for the replies to my questions.
I have one more:
class A
{
public:
m1() const;
missing return value
m2();
missing return value;
>
};
is there any difference between
std::vector<const Av;
const std::vector<Av;
v is a const vector whose elements are of type A. Effectively,
v.push_back() (or any other operation that changes the vector) is not
allowed on v
const std::vector<const Av;
doesnot compile
>
and, what about:
A a1;
v.push_back(a1);
v[0].m1()
v[0].m2()
Talking about the 2nd case (const std::vector<Av), since v is a
const vector, non-const member functions cannot be called, const
member functions can be.
-N