2

Would it be possible to have the ability of showing line numbers in sources?

Many is the time I encountered a post with an entire C program and the OP saying the compiler gives an error in line 72.
In these cases, it would be incredibly handy to see in the post where line 72 is!

Yeah, I know, I can copy the source into my favourite text editor to see which line is the offending line, but isn't one of the core philosophies of SO to not rely on external sources?

Note: the generated line numbers should not become part of the content when you copy the source.

6
  • 1
    And then a user only copies part of the code, a mcve, and the line numbers returned from an error are utterly meaningless.
    – Cerbrus
    Commented Sep 18, 2015 at 9:46
  • The poster should get the ability to set the starting line number.
    – Mr Lister
    Commented Sep 18, 2015 at 9:47
  • Hey, wait a minute. If the example is an mcve, they can compile that and get the accurate error message from the compiler.
    – Mr Lister
    Commented Sep 18, 2015 at 9:48
  • Assuming it compiles. And in an MCVE, do you really need line numbers to find function x?
    – Cerbrus
    Commented Sep 18, 2015 at 9:49
  • Did you google for it, or search on SO itself?
    – Cerbrus
    Commented Sep 18, 2015 at 9:51
  • 1
    Yea, SE's search engine sucks. Google first, ask later ;-)
    – Cerbrus
    Commented Sep 18, 2015 at 9:58

0

Browse other questions tagged .