Got tired of writing for loops. Wrote a macro, loop(x), that expands to a for loop. Wondering why it's not a lang feature for C++ yet, tbh.
-
-
Notworthy that it doesn't work for nested loops where you want to access the outer variable, but still good.
-
By some __VA_ARGS__ macro magic, loop(x) now uses i as the variable name and loop(var,x) uses 'var' as the variable name.
Keskustelun loppu
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.