I want to initialize a std::vector (of std::pair), with k objects, with the pair of values shown below.
k
Here is my attempt:
// int k std
You can just switch to { } around the constructor arguments...
{
}
std::vector> v{k, {std::numeric_limits::max(), -1}};
See it running here