You mean the standard which nobody follows?Point taken, forgotten about for_each. In this case, no, because I want to iterate over the vector I have stashed in the value. But, that does potentially cut down on a considerable amount of clutter. My main problems with having to work in C++ again is readability and how much easier a lot of stuff is in other languages. I'll admit it may be a bit of rustiness too.
Tenks, you get the job yet?
Wow, didn't even know about 'auto'. Looks relatively new...C++11. I think this is another problem with C++ is the lack of centralized/authoritative documentation. If I google "iterate map C++", why am I shown examples of that bullshit from my previous post instead of for_each or auto?
Yeah, think I complained about macros earlier. Want to read your code? TOO BAD! The amount of ifdefs needed just to get things to compile cross-platform is staggering.You mean the standard which nobody follows?
Fuck I don't miss C++. Macros were full blown aids to a codebase unless you have a strong technical lead that says NO YOU CANT DO THAT.
It does, but I'm not sure how to print out the members of the vector without a lambda.Doesn't std::for_each pre-date the actual baked-in for each loop? Not that the std::for_each syntax looks too much prettier.
I can't speak to C++ since like I said I don't program in it but in Java before Lambdas existed you'd have a Function interface the method would accept and you'd define your logic in an anonymous inner class.
This appears similar
for_each
Yeah, doing this without lambdas or even anonymous inner classes is pointless. I'm not going to create another function just to iterate over the vector inside the map. More localized clutter is better than disjointed clutter.
I'd almost prefer C...maybe. Would have to try it out first before really making up my mind which is the lesser evil.and here I am in C... still...
The problem is the flexibility. C++ gives you enough rope to hang yourself and your neighbors unborn children.That sounds familiar...didn't Torvalds say something similar to that. Something like C > C++ because most C++ programmers suck(proud member reporting)?