Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
Comment
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


420chan's Canada Cannabis Legalization Logitech Giveaway

We're giving away Logitech hardware to lucky 420chan users to celebrate recreational legalization on October 17!
Round 1 Giveaway Entry     Discussion Thread
C++ by Hugh Cevingwater - Mon, 09 Apr 2018 09:00:46 EST ID:9B4LusOJ No.37498 Ignore Report Quick Reply
File: 1523278846948.jpg -(24430B / 23.86KB, 576x768) Thumbnail displayed, click image for full size. 24430
I'm looking for something a bit like std::map, except that I don't care about a <key, value> pair; I just want to be able to say to the thing, "here, keep this integer". And "hey, have you got that integer, yes or no?"

Something tells me a hashmap isn't the right tool for the job, but I can't seem to figure out what is. Any ideas?
>>
Albert Hingerdat - Mon, 09 Apr 2018 09:33:39 EST ID:8hwK1pxu No.37499 Ignore Report Quick Reply
>>37498
You probably want std::hash

It's like std::map, except it only takes a key and instead of having to implement less than, you have to implement a hash function for the type you are using if it doesn't have one
>>
Hamilton Drallerson - Tue, 10 Apr 2018 15:06:39 EST ID:9B4LusOJ No.37509 Ignore Report Quick Reply
>>37499
Oh that did the trick. Thanks.
>>
Doris Clubblesedge - Sat, 05 May 2018 15:20:32 EST ID:w/eFrgQ5 No.37526 Ignore Report Quick Reply
Why not set or multiset? http://www.cplusplus.com/reference/set/
>>
Shitting Gumbleman - Sun, 06 May 2018 03:33:29 EST ID:Xm/W+3lL No.37527 Ignore Report Quick Reply
If all you care about is "could this item potentially be in this set?", then you might want to look into using a Bloom filter datastructure (not the kind used in graphics, but the other kind used in general computer science).
https://en.wikipedia.org/wiki/Bloom_filter
>>
Jarvis Bemmerbury - Mon, 14 May 2018 19:02:15 EST ID:r5si74OP No.37542 Ignore Report Quick Reply
>>37527
y not just a set


Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.