I'm stuck, why am i getting an error: declaration is incompatible...
'void A::function(int,int,std::vector<_Ty> *)' : overloaded member function not found in 'A' error C2061: syntax error : identifier 'vector' 1> with 1> [ 1> _Ty=Point 1> ]
//cpp file
void A::function(int a, int b, vector<B> *p)
{
}
//header file
class B
{
public:
int q;
};
class A
{
public:
void function(int a, int b, vector<B> *p);
};
A::function
decleration in cpp file? And why is class B there? – ali_bahoo#include <vector>
. – ali_bahoo#include <vector>
thenusing namespace std;
to the header file. also perhaps you have writtenvoid A::function(int,int,std::vector<_Ty> *)
instead ofvoid A::function(int,int,std::vector<B> *)
in a place. – Tamer Shlash