Like Tree1Likes
  • 1 Post By Elkvis

Copying code with line numbers

This is a discussion on Copying code with line numbers within the Tech Board forums, part of the Community Boards category; I have seen code with the line numbers scattered throughout the forum. I tried to copy in my editor but ...

  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    3

    Cool Copying code with line numbers

    I have seen code with the line numbers scattered throughout the forum. I tried to copy in my editor but I do not get line numbers when I do this.... so simple question... how do you do it? Trying to be prepared for when I have a question concerning code....

    I am using Microsoft Visual C++ 2010 express.


    Thanks much.

    Michael

  2. #2
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Why do you need line numbers in the editor ? (It won't compile with the line numbers.)
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  3. #3
    Registered User
    Join Date
    Mar 2012
    Posts
    3
    The line numbers are put in there by the editor. I checked the box to have them in. That way when it gives me an error with a line number I can find it easily.

  4. #4
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,650
    Click the button above the code that says "To plain text"?

    EDIT: Oh, you want it *with* line numbers...never mind. But you don't seem to understand...your *compiler* will tell you the line numbers when there's an error.

  5. #5
    Registered User
    Join Date
    Mar 2012
    Posts
    3
    Here is what I am trying to do. When someone has a problem in code they are copying code here in the forum with line numbers. It looks like just like what I have in my editor in Express 2010. I am trying to figure out how they copied the code from their editor to the forum with the line numbers so when I have a problem in my code I can do the same thing.

  6. #6
    Registered User
    Join Date
    Oct 2006
    Posts
    2,394
    the forum automatically adds the line numbers when it formats the code wrapped in code tags.
    phantomotap likes this.

  7. #7
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,246
    Please don't add stuff to your code that isn't code.

    Soma

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extra line break added during copying
    By Tigers! in forum C Programming
    Replies: 14
    Last Post: 10-21-2009, 04:49 AM
  2. detecting numbers in a code of line
    By aama100 in forum C++ Programming
    Replies: 7
    Last Post: 01-23-2008, 09:24 AM
  3. Imposing Line Numbers automatically in the C code
    By cavestine in forum C Programming
    Replies: 14
    Last Post: 10-15-2007, 12:41 AM
  4. Line numbers
    By cdn_bacon in forum Tech Board
    Replies: 3
    Last Post: 04-28-2007, 04:58 PM
  5. line numbers?
    By anomaly in forum Tech Board
    Replies: 5
    Last Post: 12-11-2003, 12:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21