line numbers?

This is a discussion on line numbers? within the Tech Board forums, part of the Community Boards category; Hi Is there a way to print out line numbers with the code (i.e. number each line of code)? Or ...

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    17

    line numbers?

    Hi

    Is there a way to print out line numbers with the code (i.e. number each line of code)? Or even better export it to word with line numbers?

    (In MS Visual C++ 6.0)

    Thanks

  2. #2
    ___
    Join Date
    Jun 2003
    Posts
    806
    There are text editors that use that.
    "When I die I want to pass peacefully in my sleep like my grandfather did, not screaming and yelling like the passengers in his car."

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    17
    Would you care to mention any good one?

    Actually, do you know of one that can save the line numbers with the code as well in text?
    Last edited by anomaly; 12-10-2003 at 02:31 PM.

  4. #4
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Why would you want to save the line numbers with the code?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  5. #5
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    echo that, any editor worth it's salt just lists what number it is (www.textpad.com is a good one). You don't have to save the numbers for any reason.
    PHP and XML
    Let's talk about SAX

  6. #6
    Registered User glUser3f's Avatar
    Join Date
    Aug 2003
    Posts
    345
    in VC++ 7:
    Tools > Options > Editor > C++ > Line Numbers

    But you won't be able to copy line numbers with your code, so if you want to add your code to a word doc with line numbers, why not write a program for it, it would be extremely easy, read the file line by line, add line number, and print it to another file.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with reading numbers from the command line
    By Nterpol in forum C Programming
    Replies: 4
    Last Post: 06-01-2006, 01:40 AM
  2. Help displaying line numbers of a text document
    By Japatron in forum C Programming
    Replies: 4
    Last Post: 05-04-2006, 01:34 PM
  3. Showing Line Numbers in MSVC++
    By drdroid in forum Windows Programming
    Replies: 1
    Last Post: 01-09-2003, 02:23 PM
  4. Specifying Line Numbers
    By drdroid in forum C++ Programming
    Replies: 1
    Last Post: 05-25-2002, 11:00 AM
  5. SSCANF help
    By mattz in forum C Programming
    Replies: 7
    Last Post: 12-10-2001, 03:53 PM

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