User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » __LINE__ and __FILE__ Page [1]  
Deshman007
All American
3245 Posts
user info
edit post

ok, so since NCSU doesn't teach C programming (to any great extent) and I have not had the need to program C for a long time now.....can some one help me with the macros __LINE__ and __FILE__. When would you use them and why?

thx

3/16/2006 11:01:40 AM

Lokken
All American
13361 Posts
user info
edit post

msdn.microsoft.com

3/16/2006 11:06:42 AM

Deshman007
All American
3245 Posts
user info
edit post

^

what next

http://www.google.com?

[Edited on March 16, 2006 at 11:10 AM. Reason : thx for nothing]

3/16/2006 11:10:16 AM

Excoriator
Suspended
10214 Posts
user info
edit post

surprisingly, the first few results look like they'd be useful or at least give you an idea of how to construct better search terms

http://www.google.com/search?q=_line_+_file_+c

3/16/2006 11:14:13 AM

Deshman007
All American
3245 Posts
user info
edit post

is there anything like this in Java??

[Edited on March 16, 2006 at 11:22 AM. Reason : java]

3/16/2006 11:17:29 AM

Specter
All American
6575 Posts
user info
edit post

Good god this is the easiest thing in the world.

we did something exactly like this in csc 253 a while ago

3/16/2006 11:25:25 AM

Deshman007
All American
3245 Posts
user info
edit post

^thank you for your help....bunch of smart ppl here. I was not a CSC major....ECE. This could be why I dont know this!

3/16/2006 11:29:51 AM

Specter
All American
6575 Posts
user info
edit post

If you're an ECE major, you should be better at C than at Java

3/16/2006 11:30:58 AM

Deshman007
All American
3245 Posts
user info
edit post

^not true....we only have ~3 classes that use C and we have to take 5 classes in Java.

the question is....i dont know the equivalent in Java!

[Edited on March 16, 2006 at 11:33 AM. Reason : asdf]

3/16/2006 11:32:50 AM

Excoriator
Suspended
10214 Posts
user info
edit post

Quote :
"If you're an ECE major, you should be better at C than at Java"

3/16/2006 11:39:21 AM

joe17669
All American
22728 Posts
user info
edit post

Quote :
"If you're an ECE major, you should be better at C than at Java"


I have to agree.

Even though they push you through structured Java classes, if your ECE classes use C, you should learn it yourself.

3/16/2006 12:17:48 PM

dakota_man
All American
26584 Posts
user info
edit post

The __FILE__ C++ preprocessor directive contains the name of the file being compiled. Similarly, the __LINE__ preprocessor directive contains the line number of the original source file that is being compiled. Both the __FILE__ and __LINE__ preprocessor directives have two underscores both before and after the word.

[Edited on March 16, 2006 at 7:30 PM. Reason : .]

3/16/2006 7:29:59 PM

synchrony7
All American
4462 Posts
user info
edit post

^^ Give the guy a break, its not like __LINE__ and __FILE__ get used very often. I've done plenty of C/C++ programming and have never used them. Its not like he asked "What's a macro?"

3/20/2006 10:44:30 AM

dakota_man
All American
26584 Posts
user info
edit post

i checked when he asked and i didn't have them defined

3/20/2006 10:26:26 PM

 Message Boards » Tech Talk » __LINE__ and __FILE__ Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.