c++ - why # followed by a number seems do nothing in C plus plus -


repro steps:

insert following line line of c++ source code.

#1234 

any line including first line, last line. can input between function header , body this.

int foo() #1234 { return 0; } 

the number can long, tested more 170 characters. if add non-numeric character, compile error.

my question is: why # followed number doesn't break compile, while # followed non-numeric character does.

thanks time, everyone.

that line directive. preprocessors output these tell compiler lines in original source file.

as preprocessor can add many (sometimes hundreds or thousands) lines source provides compiler, compiler needs way keep track of line numbers of original source file. done through special directives such that.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -