I was wondering if anyone knew if it was possible, in ALL possible situations, to push into a queue made from a deque and pop from the queue from different threads without using some form of mutal exclusion? It seems like the push does not corrupt the other elements, but I don't know if that...
I am using threads to update an STL multimap holding my data. Since they will be concurrent I am trying to declare the multimap as volatile. However this produces a compiler error on the line when I call the insert function for the multimap. When I remove that keyword, it compiles fine. My...
If anyone knows of any good speed-ups to the plain old binary search, I would appreciate your input. I'm taking about ANYTHING, such as different ways to do the operations on bottom, mid, and top or do away with any assignments or comparisons. I've gotten a few, but my mind only goes so far. :)...
Is there a way to set an input file stream:
ifstream in;
so that it will read not from a file, but from stdin instead? What I am trying to do is make it so the input can come from either stdin or from a file. If there is no file specified it will be from stdin. If there is a file, it will read...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.