This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems with vector definition


Hi,

i am trying to define a vector whose elements belong to class A:

class A{
public:
   A(B b) {}

private:
  A(const A&);
  A& operator=(const A&);
}
where B is another class, doesn't matter its content.

The compiler (g++ v3.4.2) says that there is an error because A(const A&) is private when i define a vector:

B b;
vector<A>aVector(2, b);

Can you help me?

Thanks in advance.
Roberto.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]