473,385 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using #line directive

AA
Hi,
I have a C++ project in DOT NET. I am using the __FILE__ and __LINE__
to print the current file and line number. I do not want the file anem
with the full path to be printed. So I used the #line directive.

Expand|Select|Wrap|Line Numbers
  1.  
  2. #line 3 "11.cpp"
  3.  
  4.  
Still the full file name along with the name (11.c) gets printed. If I
change 11.c above and type something else, say trial.cpp, the full file
path along with trial.cpp gets printed. How can I just get the file
name printed using __FILE__?

Regards,
AA

Nov 30 '06 #1
1 982
I have a C++ project in DOT NET. I am using the __FILE__ and __LINE__
>to print the current file and line number. I do not want the file anem
with the full path to be printed.
Have a look at the /FC compiler switch.

Dave
Nov 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Imre | last post by:
As far as I know, the using directive is transitive, and I'm not sure I like this. So I'd like to ask if there's any workaround. Consider this: namespace MyNameSpace { void...
5
by: Boris Kuznetsov | last post by:
This occurs in an empty project when I add the following string: #using <mscorlib.dll> Can anyone tell me why would #using ... not be working???? MSDN says nothing about this error. Please...
2
by: Mantorok Redgormor | last post by:
what is the purpose of the #line directive? how is it suppose to be used? I didn't see it mentioned in the faq and I can't make any sense of it from the standard. -- nethlek
1
by: vishal | last post by:
What does #line 182 parser.y mean in a C program?
4
by: Cal Lidderdale | last post by:
My input line is i1,i2,i3,i4,i5,i6,i7,i8^,...i596,597, ... 14101,14102...NL/CR very long line of data - I only want the first 8 items and the delimiter between 8 & 9 is a carrot "^". The line...
3
by: neverstill | last post by:
Hello- I am a little confused about something. I have create a .cs file that looks like this: using System; namespace MyApp.Types { using INT = System.Int32; }
3
by: Erik H. | last post by:
I have an ASPX page in which I am trying to bind a datagrid to a dataset pulled from Microsoft Access DB using code inline method. For some reason, the compiler is having a problem with 'using'....
0
by: AA | last post by:
Hi, I have a C++ project in DOT NET. I am using the __FILE__ and __LINE__ to print the current file and line number. I do not want the file anem with the full path to be printed. So I used the...
11
by: xdevel | last post by:
Hi, I don't understand option. if I write: #line 100 "file" I change file numeration to start to line 100 but what "file" ? any example?
7
by: J.H.Kim | last post by:
Hi, everyone I saw the preprocessor "#line " in some source codes. It was like this : #line 2972 "ifupdown.nw" Please tell me what is the meaning of that "#line"? Thanks in advance.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.