Use templates: template inline void do_something_loop(Func f) { for (int a=1; a.
This is ok, but I need to define a function every time (no c++11). The advantages of macro is that I can write stuff like: MYLOOP_BEGIN { va = 10; vvabc = a+1; } MYLOOP_END; – wiso Aug 23 at 12:34 Yes, without lambdas there is no way other than a macro to do that. – Sven Aug 23 at 12:57.
Make a helper loop function: template void loop(Work work) { for (int a=1; a.
1/ do is a keyword (the specter of untested code...) 2/ The & before some_work is unneeded in C++, a function reference is trivially convertible into a function pointer. – Matthieu M. Aug 23 at 9:15 @Matthieu: Thanks, fixed.
– Juraj Blaho Aug 23 at 9:19.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.