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
msdn.microsoft.com
3/16/2006 11:06:42 AM
^ what nexthttp://www.google.com?[Edited on March 16, 2006 at 11:10 AM. Reason : thx for nothing]
3/16/2006 11:10:16 AM
surprisingly, the first few results look like they'd be useful or at least give you an idea of how to construct better search termshttp://www.google.com/search?q=_line_+_file_+c
3/16/2006 11:14:13 AM
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
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
^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
If you're an ECE major, you should be better at C than at Java
3/16/2006 11:30:58 AM
^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
3/16/2006 11:39:21 AM
3/16/2006 12:17:48 PM
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
^^ 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
i checked when he asked and i didn't have them defined
3/20/2006 10:26:26 PM