I'm trying to initialise/assign values to a ublas vector by defining the vector in my .h file:
someClass{
ublas::vector<double> *L;
} ;
Then in my .cpp file:
someClass::someClass()
{
L = new ublas::vector<double>[4];
L->data()[0] = 1;
}
The code compiles fine, but when I run it, the last line in my .cpp file gives an error. There is probably something very simple I'm missing but I can't figure out what...
Many thanks in advance! :)