Include-Pfade

moin


Ja, es scheint auch ein ANSI-C++ zu geben, guck mal in der MSDN nach ANSI.

Achtung, jetzt kommt eine Vermutung:
Und wie es aussieht ist __FILE__ kein Ansi, sondern Compiler abhängig.
Oder sind die Preprozessor Anweisungen auch Ansi?


mfg
umbrasaxum
 
moin


Hab grad im Buch "The C Programming Language", dem Ansi C Buch überhaupt, nachgeguckt und dort gab es __FILE__ auch schon, also wird es wohl doch Ansi C sein.


mfg
umbrasaxum
 
jokey2 hat gesagt.:
@deepthroat: Wenn Dir Deine Zeit zu kostbar ist, um Anderen zu helfen, das laß es!
Ist sie nicht, sie ist mir allerdings zu kostbar jenen zu helfen die zu faul sind selbst nachzudenken und keine 2 min. übrig haben um eine Theorie zu überprüfen und lieber einen ellenlangen Text ins Forum schreiben.
jokey2 hat gesagt.:
Außerdem geht es bei mir nicht um ein C++ - Projekt im VS sondern um ein Projekt mit dem dcc-Compiler für einen MPC565.

(Was bedeutet VS?) Ist doch egal mit welchen Compiler und für was für einen Prozessor das gebraucht wird.
 
Sektion 6.10.8 im C99-Standard:
...
The following macro names shall be defined by the implementation:
_ _LINE_ _ The presumed line number (within the current source file) of the current
source line (a decimal constant).
_ _FILE_ _ The presumed name of the current source file (a character string literal).
_ _DATE_ _ The date of translation of the source file: a character string literal of the
form "Mmm dd yyyy", where the names of the months are the same as
those generated by the asctime function, and the first character of dd is
a space character if the value is less than 10. If the date of translation is not
available, an implementation-defined valid date shall be supplied.
_ _TIME_ _ The time of translation of the source file: a character string literal of the
form "hh:mm:ss" as in the time generated by the asctime function. If
the time of translation is not available, an implementation-defined valid
time shall be supplied.
_ _STDC_ _ The decimal constant 1, intended to indicate a conforming implementation.
...

lg
Johannes
 
Zuletzt bearbeitet:
Zurück