This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Problems with vector definition
- From: Juan Roberto Jiménez Pérez <rjimenez at ujaen dot es>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 28 Dec 2004 12:10:23 +0100
- Subject: 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.