Is there a direct analog to this in C++?
for num in [1,4,5] :
iterates through a loop using num=1, then 4, then 5. If I call continue within this loop it goes to the next number wherever I may call it.
Is there a similar structure in C++?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In C++11, the following is legal:
{1,4,5}here is an instance ofstd::initializer_list<int>.