Connecting Tech Pros Worldwide Forums | Help | Site Map

Macro GCC????

SAX
Guest
 
Posts: n/a
#1: Jan 13 '06
Exist a macro for print the number of the row?
I want add the number of the row in error out without every time change
the number?
As example:
printf("error line [GCC_macro]");

TNX
SAX

Bob Hairgrove
Guest
 
Posts: n/a
#2: Jan 13 '06

re: Macro GCC????


On Fri, 13 Jan 2006 10:59:34 +0100, SAX <none@none.it> wrote:
[color=blue]
>Exist a macro for print the number of the row?
>I want add the number of the row in error out without every time change
>the number?
>As example:
>printf("error line [GCC_macro]");
>
>TNX
>SAX[/color]

How about __LINE__? I think this is a standard pre-processor macro,
but I might be mistaken. Might need to do a debug build for it to
work, though.

--
Bob Hairgrove
NoSpamPlease@Home.com
SAX
Guest
 
Posts: n/a
#3: Jan 13 '06

re: Macro GCC????


Ops ...
Stupid question! :-(

TNX
[color=blue]
> How about __LINE__? I think this is a standard pre-processor macro,
> but I might be mistaken. Might need to do a debug build for it to
> work, though.
>
> --
> Bob Hairgrove
> NoSpamPlease@Home.com
>[/color]
Default User
Guest
 
Posts: n/a
#4: Jan 13 '06

re: Macro GCC????


Bob Hairgrove wrote:
[color=blue]
> On Fri, 13 Jan 2006 10:59:34 +0100, SAX <none@none.it> wrote:
>[color=green]
> > Exist a macro for print the number of the row?
> > I want add the number of the row in error out without every time
> > change the number?[/color][/color]
[color=blue]
> How about LINE? I think this is a standard pre-processor macro,
> but I might be mistaken.[/color]

That's correct.
[color=blue]
> Might need to do a debug build for it to
> work, though.[/color]

No.



Brian


Closed Thread