Say if i have a class or function that has an array parameter that can be passed in.
Is there anyway to pass it in without having a premade variable.
eg
1 2 3 4 5 6 7 8 9
class myClass
{
public:
myClass(float passArray[3]): storeArray(myArray){//}
float storeArray[3];
}
/* is there a way to pass in 3 numbers instead of an array and have them count as an array eg:
myClass object(1,2,3);
*/
I know of creating a seperate constructor and setting x y z to [0][1][2] of the array if thats suggested.