In the code below, I make various variation patterns for int values ββas well as for objects. It works for all primitive types. It also works for only two objects. But the code does not compile when I use more than two argument objects to propagate.
multiply(1, 2, 3, 4, 5, 6)
How can I solve this problem for more than two objects? Multiplication is performed as a left associative.
#include <iostream>
Alper
source share