#line [C++ Reference]
Keywords: preprocessor,line
Date: 2008-10-14T15:42:05-0700

[[#line]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- fr
- it
- jp
- pl
- ru
- tr

## #line

Syntax:

        #line line_number "filename"

The #line command is simply used to change the value of the LINE and FILE variables. The filename is optional. The LINE and FILE variables represent the current file and which line is being read. The command

         #line 10 "main.cpp"

…changes the current line number to 10, and the current file to “main.cpp”.

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •