What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

This question already has an answer here:

I want to attach a code file to my question, but I am not able to find a link to do it. Is attaching files possible at all?

share|improve this question

migrated from stackoverflow.com Jul 27 '11 at 12:17

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Shadow Wizard Sep 29 at 23:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
And yes, I'm aware that he's asking about attaching a file, but I still think the FAQ makes it clear that it should be inlined. –  Time Traveling Bobby Jul 27 '11 at 13:17
    
People won't bother to sip through big files anyway, and those who are willing will ask you to send it to them personally via email. –  Shadow Wizard Jul 27 '11 at 13:57
3  
@Shadow Wizard: Don't give him the wrong ideas. Nobody on SE will do that. –  Time Traveling Bobby Jul 27 '11 at 14:50
    
Not sure this is a duplicate of that question. Related and informative, yes, but not a dupe, IMO. –  Jon Seigel Jul 28 '11 at 4:14

2 Answers 2

You can't attach a file here, but you can post your code in the question itself. Post the code in the body of your question, select it with your mouse, then click the { } button above the edit window to format it as a code block.

share|improve this answer

If you've got a large amount of code you should consider trying to reduce it to the barest minimum that repeats the problem.

You are more likely to find people will be prepared to read a short 20 line snippet of code and help you than some class file that 500+ lines long.

share|improve this answer
    
But it would be great to post an answer in working code, unzip and go –  k.c. Sep 30 '12 at 13:51