Preprocessor defines

P

Pelle Beckman

Hi,

This might be OT...

Are there preprocessor defines in the C++ standard,
such as __FILE__, __LINE__, __NAMESPACE__, __FUNCTION__, ec?
If there is, were can I find a list?

If there isn't, does anyone know of a good list
for those defines under Gcc (3.4 <=)?


-- Pelle
 
I

Ian

Pelle said:
Hi,

This might be OT...

Are there preprocessor defines in the C++ standard,
such as __FILE__, __LINE__, __NAMESPACE__, __FUNCTION__, ec?
If there is, were can I find a list?

If there isn't, does anyone know of a good list
for those defines under Gcc (3.4 <=)?
No, the first two are inherited from C, __func__ is defined as an
identifier in C99.

Other than that, look in the man pages.

Ian
 
A

Alan Johnson

Pelle said:
Hi,

This might be OT...

Are there preprocessor defines in the C++ standard,
such as __FILE__, __LINE__, __NAMESPACE__, __FUNCTION__, ec?
If there is, were can I find a list?

If there isn't, does anyone know of a good list
for those defines under Gcc (3.4 <=)?


-- Pelle

__LINE__
__FILE__
__DATE__
__TIME__
__STDC__
__cplusplus

I think that is a complete list as defined by the standard (of course
your implementation could define several more).

-Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top