Thank you for your help so far.I try now to move on with my vector but now comes the hardest part.
All the values that the float vector receives must combine somehow that the value of their addition do not overcome 12.
So in other words even if I have 100 entries the program must find the best combination from all sum of the values that are closest to 12.
ex. 2.65, 4.56, 8.98, 5.21 etc
So the program must find that 2.65 + 4.56 + 5.21 is the closest to 12.