I try to pass vector as a function argument to pointer but compiler always return error.
error: cannot convert 'std::vector' to 'float*' in assignment
When I have passed array in the same way it works perfectly. So what is wrong here? Is it possible to assign vector to pointer?
vector <float> test;
class data {
float *pointer;
int size;
public:
void init(vector <float> &test, int number);
};
void data::init(vector <float> &test, int number)
{
size= number;
pointer = test;
}