|
As our program manager said once:
After object-oriented design course every programmer writes only singleton classes.
|
|
|
|
|
Wait.. what?
Are you talking about std::array<t>, std::list<t> or std::map<k,v>? Don't mix their terminology, please.
I'm guessing you're dealing with a map<k,v>.
And I'm guessing the some_map[value] is initializing a KV-pair with value as key (hella confusing name, btw) and a default value (of type V).
Typically, this is done before some algorithm which relies on a particular key existing / values to be initialised to keep its complexity low.
Nothing wrong with that, except the very awful variable names.
Something like this would make more sense:
std::map<keytype, valuetype=""> some_map = new std::map<keytype, valuetype="">()
some_map[new KeyType("key 1")];
KeyType key = new KeyType("key 2");
some_map[key] = new ValueType();
|
|
|
|
|
Seems to be something like that.
Anyway, reading my_array[value]; and that is it, is damn confusiing!
|
|
|
|
|
|
Don't get frustated, create your own adpator so you can do something like:
[static] map_adaptor::wrap(some_array_which_is_really_not_a_primitive_array).find_element_or_insert(value);
|
|
|
|
|
|
No sh*t it inserts it, I just said that.
RTFOT FFS.
|
|
|
|
|
Why I don't hate the C++ language I have found it to be overly arcane with its syntax...
Steve Naidamast
Sr. Software Engineer
Black Falcon Software, Inc.
blackfalconsoftware@outlook.com
|
|
|
|
|
Or is that Agile ? [^]
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
|
|
|
|
|
I reckon that we Alsatian have always been a bit weird.
|
|
|
|
|
Do share the perceived correlation between this and Scrum or Agile...
Indeed, tomorrow does arrive, but only on Tuesday's.
|
|
|
|
|
You're asking me to make literal sense ... in the Lounge ?
Well, if I had to estimate the current location of the semiotic goalposts, I'd throw an a priori marker on the field near the phase-state transition between histrionic and hysteric.
cheers, Bill
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
|
|
|
|
|
You can tell a good horror movie just by the reaction of the audience[^].
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
That's been quite well done - pity the sound was added afterwards, and the owner can be seen waving the toy...
Sent from my Amstrad PC 1640
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You would also be explaining the tricks during a magic show.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
Would I?
That would be against Magic Circle rules.
(But I'm not a member of the Magic Circle, so "Yah! Boo! Sucks!" to them!)
Sent from my Amstrad PC 1640
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Quote: You would also be explaining the tricks during a magic show ...and what's wrong with that?
We are all engineers here.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
What did Grandma always say...
about hyper-threading?
PQOTW takes a long summer break now. I hope you survive. See you in late August.
... such stuff as dreams are made on
|
|
|
|
|
The knit knots not neat?
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
Nice to knit, innit?
... such stuff as dreams are made on
|
|
|
|
|
Yes, too old to pick up the fallen knit but still strong when it comes to nitpick.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
Darn?
Socialism is the Axe Body Spray of political ideologies: It never does what it claims to do, but people too young to know better keep buying it anyway. (Glenn Reynolds)
|
|
|
|
|
...on this[^] please.
Might be able to get this from a particular site I have mentioned before (and sometimes have my post or link removed) at half price. I don't have the software or the dollars to buy Visio and this could be good if the website isn't lying.
So if you've used it or not, give me your thoughts.
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
You can't go wrong if there is a trial version...
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
Well ... you can invest a fair amount of time trying to decide if it's going to work for you, then find a better, cheaper equivalent afterward? That's happened to me a few times.
Sent from my Amstrad PC 1640
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|