I want to write a function that creats a 3d-vector. I don't know how I should declear the 3d-vector.
I've tried this:
vector <int> a[3];
That works fine but then I don't know how to pass them to a function that calculates the magnitude. That function is in a header file.
I hope you understand my problem and that you can give me any tips.
Do you mean a vector with three initial elements?
That is done with vector<int> a(3);
How do I access the elements of a?
Last edited on
Last edited on
HI ,
what exectly do you want to do ?
because if you want to store int you only require .
vector<int> a ;
Thanks for the help, but there is more I don't understand.
Where can I read more about this?