std::vector<int> interpret(const std::string &src, const std::vector<int> &input = {});
I understand everything about the signature except setting the reference input to {}. What does that mean?
std::vector<int> interpret(const std::string &src, const std::vector<int> &input = {});
I understand everything about the signature except setting the reference input to {}. What does that mean?
The =
introduces a default value for the parameter... {}
in this case indicates an empty vector
. Consequently, you can invoke the function with one argument, and input
will be empty.