Constant defined to the current line

This is a discussion on Constant defined to the current line within the C Programming forums, part of the General Programming Boards category; Does anyone know if there is a way to get a contant defined to whatever line of code it gets ...

  1. #1
    Registered User Xzyx987X's Avatar
    Join Date
    Sep 2003
    Posts
    107

    Constant defined to the current line

    Does anyone know if there is a way to get a contant defined to whatever line of code it gets referenced on in Visual C++, and also maybe a constant defined to the name of the file the code is in (although this could easily be done manually...)? I thought this might be something usfull to have to pass to debug functions.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    You mean like __LINE__ and __FILE__?
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Printing Length of Input and the Limited Input
    By dnguyen1022 in forum C Programming
    Replies: 33
    Last Post: 11-29-2008, 03:13 PM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. Trouble replacing line of file
    By Rpog in forum C Programming
    Replies: 4
    Last Post: 04-19-2004, 10:22 AM
  4. linked list recursive function spaghetti
    By ... in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2003, 02:53 PM
  5. HelpMePlease
    By Prncess100 in forum C++ Programming
    Replies: 6
    Last Post: 12-11-2002, 01:02 PM

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