Quote Originally Posted by nadeera View Post
I can't figure out how to solve this error, please help.

Code:
double price[itemNumber] = {10.50, 13.00, 10.50, 13.00, 8.50, 10.00, 11.50, 13.50};
double quantity[itemNumber];
double amountDue;

amountDue = quantity * price;
I keep getting error C2296 '*': illegal, left operand has type 'double [8]' and error C2297 '*': illegal, right operand has type 'double [8]'. How do I solve this?
std::vector is not a mathematical vector. It serves a purpose of a container storing its elements sequentially in a contiguous chunk of memory (it is a dynamically grown array).
There are some pretty good libraries out there which can help you deal with math stuff, for example, you might want to check out Eigen.