This is a short example of the code I want to use:
template <class T>
class B
{
public :
bool func1(const T& t)
{
// do something
}
};
class A
{
B<int*> b;
public:
void func2(const int* a)
{
b.func1(a);
}
};
I'm getting this error :
error C2664: 'B::func1' : cannot convert parameter 1 from 'const int *' to 'int *const &'
is a way to solve this without changing the functions declarations and without using const_cast?
Edit:
some information behind the problem
B
is actually a container class I wrote (lets say a list)A
is a class using that listfunc1
is a function that need to find if an element is in the list or notfunc2
is a function that recieves an element to remove from the list