When I pass a vector's address using the syntax below:
void myfunction(std::vector<double>*);
int main()
{
std::vector<double> t;
myfunction(&t);
return 0;
}
void myfunction(std::vector<double> &v)
{
cout << "The function ran" <<endl;
}
I receive this error and I don't know why.
pal-nat184-134-146:p25 pdevieti$ g++-4.9 test.cpp
Undefined symbols for architecture x86_64:
"myfunction(std::vector<double, std::allocator<double> >*)", referenced from:
_main in ccVmpacj.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status