Check the duplicate link for a wealth of reasons why comments will not be required when closing questions. Should a user be forced to add a comment when they vote to close?
However, I think it's helpful for people to leave comments, so I'll use this as an opportunity to provide you with some feedback:
The reason your post was likely closed is because it's very vague. Stack Overflow gives you a large question box, a blank canvas to work with, for a very important reason: The more information you can tell us about your problem, the faster potential answerers will understand your problem, what you're trying to do, and why you're trying to do it. This helps not only you but also future visitors searching for answers to the same or a similar problem.
Without the details, one must ask why you didn't just Google the solution. Or worse, a bunch of answerers make assumptions about what you're trying to do, spend several minutes writing a very detailed and thorough answer, only for the original asker to exclaim breathlessly "no!i tried that it didnt work!!!"
As a question asker, you're pretty critical to the success of Stack Overflow. Asking well-research questions gives back to the community just as much as answering them does. If you can edit your post to provide more details about the exact problem you're trying to solve, there's a good chance you can get it reopened. Just make sure it relates to programming. It looks like people just thought you were lost and closed as off-topic. :)
By the way, if no one leaves a comment explaining the close reason, you can always ask in the comments. Just be nice about it. Chances are someone like me might be hanging around -- who wasn't a close voter -- who can still give you some helpful feedback that may help get the post reopened or help you write a better question next time. Hope this helps!