Is there any reason why you can't use double instead of int in the first place? That way the conversion would be unnecessary.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
What I mean is, why not use an array of double from the start instead of an array of int, then pass that into the external function? Are you also using an external function that can't be changed which gives you an array of int, or something?
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Can you modify the function so that it needs ints or make it template?
firstPerson
Senior Poster
3,923 posts since Dec 2008
Reputation Points: 841
Solved Threads: 608