title: for loop with enum in C++
body: <p>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.</p>
  
  <p>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.</p>
  
  <p>In pascal I have code like this:</p>
  
  <pre><code>{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
  ...
  </code></pre>
  
  <p>The similar way of doing a for each loop over enumerations is possible in python too.
  My question is:</p>
  
  <p>Is there any way of doing for or even while loop over enumerations in C++?</p>
  
  <p>I know this may seem as a beginers question but I tried on few different ways to do it doesnt work. Doesnt compile.</p>