Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: shiki on March 30, 2012, 10:02:55 am
-
the line number is used to trace where the something happens. Is there any macro or function like that?
And how to get the current file name when program runs?
-
C/C++ macro or a macro in C::B's marco expansion rules?
(For the C/C++, you've asked at the wrong forum and the topic will be lock)
Here they are: __LINE__, __FUNCTION__, __FILE__
p.s. search the net is the faster option most of the time.
-
its should be OK now. When using GCC , these pre-defined macro are useful : __FILE__,__FUNCTION__,__LINE__
I misunderstood the compiler and the IDE . Under windows, when using vs, there is a little bit moment notice the compiler.
-
C/C++ macro or a macro in C::B's marco expansion rules?
(For the C/C++, you've asked at the wrong forum and the topic will be lock)
Here they are: __LINE__, __FUNCTION__, __FILE__
p.s. search the net is the faster option most of the time.
Thanks very much, This is what i need.