We may be smart and talented on SO, but the fundamental part of the problem solving process is the ability to break it down for even the lowliest of scripters.
Think of it this way: The problem you're solving is the meat and potatoes. The code is just gravy.
You would want to express your question in such a way that, without code, we have our own ideas of how this algorithm should be implemented. You add your code to satisfy the notion of previous work, and to pinpoint what your confusion is - it could be an obscure exception being thrown, or the results aren't what you expect them to be.
The code must be substantial enough to be run by any passer-by in fifteen seconds or less (hence an SSCCE), but the key thing is that your question be detailed enough that, in 2 minutes or less of skimming, we can understand what you're trying to solve and where you're stuck.
To specifically address the question, my preferred order is a description of the problem with just enough detail, and then an SSCCE to illustrate what you've attempted, and what you're struggling with. This would convey clarity of intent and clarity of question. Seeing code first kind of makes my eyes glaze over; my attention isn't immediately captured by seeing
int**** mtx;, and attention spans are what you're mostly battling against. Make your initial communication point count!