I have problem trying to make for each loop in C++. I'm not certain is this is possible in C++ if it is I still dont know to make it.
I have one simple problem written in pascal that does finding of the day in year when it is a friday 13 or saturday 25 no metter which day.
In pascal I have code like this:
{First I declare types}
type
months = (January, February, March, April, May, June, July, August, September, October, November, December);
...
{Then I declare variable for months}
var
m: mesec;
...
{Then I can declare for loop that will loop over months}
for m:= januar to december do
...
The similar way of doing a for each loop over enumerations is possible in python too. My question is:
Is there any way of doing for or even while loop over enumerations in C++?
I know this may seem as a beginers question but I tried on few different ways to do it doesnt work. Doesnt compile.