List iterator not dereferencable?

Could you have a race-condition? If the list were empty, then I’d expect a problem when trying to dereference begin(), but you check for empty. Do you have another thread adding or removing items from list in parallel? Your code snippets works for me on VS 2008 (assuming I typedef Counted_message_reader to int).

Error handling in Bash

Use a trap! …then, whenever you create a temporary file: and $temp_foo will be deleted on exit, and the current line number will be printed. (set -e will likewise give you exit-on-error behavior, though it comes with serious caveats and weakens code’s predictability and portability). You can either let the trap call error for you (in which case it uses the default … Read more

Playing Sound In Hidden Tag

I agree with the sentiment in the comments above — this can be pretty annoying. We can only hope you give the user the option to turn the music off. However…  Run code snippetExpand snippet The css hides the audio element, and the autoplay=”true” plays it automatically.

Converting bool to text in C++

How about using the C++ language itself? UPDATE: If you want more than 4 lines of code without any console output, please go to cppreference.com’s page talking about std::boolalpha and std::noboolalpha which shows you the console output and explains more about the API. Additionally using std::boolalpha will modify the global state of std::cout, you may want to restore the original behavior go here for … Read more

How to stop tracking and ignore changes to a file in Git?

Just calling git rm –cached on each of the files you want to remove from revision control should be fine. As long as your local ignore patterns are correct you won’t see these files included in the output of git status. Note that this solution removes the files from the repository, so all developers would need to … Read more

Syntax error: word unexpected (expecting “)”)

An answer to this seems to be posted in the instructions to which you linked. Admittedly it’s a long way down in the comments but it didn’t take long to search for qmake: Syntax error: word unexpected. Quote: Tej says: January 4, 2013 at 12:20 pm Ok, I have solved the Problem. Its very unfortunate that ppl did … Read more