I think you need to do 2 things:
1) Take your time in order to post code that works.
2) Post C++ where it belongs; post C where it belongs.
That's it.
I think you need to do 2 things:
1) Take your time in order to post code that works.
2) Post C++ where it belongs; post C where it belongs.
That's it.
You should keep it within reason. A short snippet of demonstrating how to do something is a good thing. Even better is if you leave it as an exercise for the OP to actually use what you posted an integrate it him/herself into his/her code, ie something that demonstrates an idea but cannot be used directly as is.
Giving complete snippets or long snippets of code is generally not a good idea.
Complete snippets is similar to spoon feeding, that is, giving code away that the OP did not write. The OP learn less than doing it him/herself.
Long snippets make the code more complex and makes it more difficult to get the point across to make the OP understand.
I am also going to agree that if you post in the C++ section, you should stick to C++ code. After all, we are teaching C++ here, and not C. Obviously the same goes for the C section.