C++ Function call with a 'new' array argument
===

I want to call a function which requires an array of integers. How could I do this without creating a new array of integers every time I want to call the function?

This is what I want to do:

    someFunction(new int[]{obj[0].getInt(), obj[1].getInt()});
instead of doing this:

    int intArray[2] = {obj[0].getInt(), obj[1].getInt()};    
    someFunction(intArray);