[Solved] Syntax for arrays as operands


In C++, if you have a C++11 capable compiler and you use std::vector instead of raw arrays, you could use initializer lists:

 void kilos(const std::vector<int> percentage,
            const std::vector<std::string> liquid);

// ...

kilos({40, 60}, {"water", "milk"});

solved Syntax for arrays as operands