Thread: MSVC++ Display Line Numbers?

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    9

    MSVC++ Display Line Numbers?

    Is there an option to display line numbers in the gutter? I'm trying to fine it but can't seem to...

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    In the gutter? What are talking about? What's the gutter? You might try putting the __LINE__ macro in your code if that's what you are talking about:

    Code:
    #include <iostream>
    
    int main()
    {
        std::cout << "This is line #" << __LINE__ << std::endl;
        return 0;
    }
    Should say "This is line #5" if you type it in exactly as it is above.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    If you are looking at errors, just double-click the error adn the line will be highlighted. Alternatively the line number is always displayed in the status bar as well.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. adding line numbers and concatenating a filename
    By durrty in forum C Programming
    Replies: 25
    Last Post: 06-28-2008, 03:36 AM
  2. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 05:20 AM
  3. Replies: 1
    Last Post: 05-01-2003, 02:52 PM
  4. Showing Line Numbers in MSVC++
    By drdroid in forum Windows Programming
    Replies: 1
    Last Post: 01-09-2003, 03:23 PM