1

For a particular answer, I need to upload 100s of lines of code, How this can be done?

1

Put your code on pastebin, and just link to it here.

But honestly, if your problem really requires hundreds of lines of code, you likely need more help than can reasonably expected here.

3

It isn't doable at this time, and there are several reasons why this is discouraged by the community. The accepted answer to the meta question Has integration of a larger code snippet system been considered? states the following:

As a rule, I think we discourage large amounts of code for several reasons..

  • It's off-putting to a searcher to see pages and pages of code before they get to any answers

  • SO is for general, reusable questions and solutions. If explaining your problem requires 2000 lines of code it's probably too specific to be of use to someone else

  • SO is not a free debugging service, and encouraging/enabling posting thousands of lines of code would encourage more people to post questions along the lines of Why doesn't this work?!!?!! followed by their entire program.

What you are describing is a neat idea that is far removed from the core mission of the stack exchange sites.

We are here to answer specific questions about programming, not to have an interactive codebase of "fixed" programs or scripts that would be impossible to search usefully but neat to browse. This is an objective-oriented site for the most part, not a novelty store.

As a general rule, show in code snippets what need to be done rather than uploading entire solutions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .