I'm currently trying to write a program that will be allow the user to muck around with net present value calculations. It's basically an exervise for me to practice encapsulation and object oriented programming.
I am using a class. The class is supposed to accept a vector from the rest of the program and then passes it into the member function. The function then uses the vectors in its calculations is supposed to return the vector at the end of its use.
1) Is there any issue that can spring up from using a vector as an input for a class?
2) Is it proper form or is there a better way to be doing this?
Sorry about the misunderstanding, I was a bit tired when I posted that.
I want to pass a vector into a function (which in turn is in a class). I know well enough how to do this with variables, but I haven't done it before with vectors. Are vectors input into functions the same way as variables or is there a different way that it is done.