I am inexperienced at c++. I have come across the below code
std::vector<char> is_prime(sqrt + 1, 1);
Update Where sqrt is a positive integer.
I believe it is defining a vector filled with characters, naming the vector is_prime, but I don't understand what the purpose of the two arguments are.
I have had a look at the documentation for std::vector, however this wasn't clear to me. I have also searched SO but no question I found helped.
Example: say sqrt is 4, then this would be in effect:
is_prime(5, 1);
Does this mean it is a vector with elements 5 and 1? A vector with size 5 and first element 1?