class C1{
public:
    C1(const C2& c){  //line 14 (works fine if i remove this constructor)
    //...
    }
};

class C2{
public:
    C2(const C1& c){ 
    //...
    }
};

the compiler show me the following error:
prova.cpp:14: error: expected ‘,’ or ‘...’ before ‘&’ token
prova.cpp:14: error: ISO C++ forbids declaration of ‘C2’ with no type

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.