0

Hi

I am having issues populating a vector using "new" where nodeVec is a vector where each entry consists of another vector with 3 elements. zMap is the vector I am trying to populate with the sum of the squares of the first two elements for each entry in nodeVec.

Any help will be greatly appreciated!

```
vector <double> mapNodalData(vector <Vec*> nodeVec, vector <double>& zMap){
for (unsigned int i = 0; i < nodeVec.size(); i++){
double vector *pz = new double vector(pow(((nodeVec[i])[0]),2) + pow(((nodeVec[i])[1]),2));
zMap.push_back(pz);
pz = NULL;
}
return zMap;
}
```