PDA

View Full Version : [C,C++] Chiamare macro


Unrue
03-12-2008, 10:38
Ciao ragazzi,
come si fa a chiamare macro C da codice C++?

Se la chiamo direttamente mi dà "Macro usage error for macro"

Ho provato anche ad includere l'header in cui è definita in extern "c", ma nulla..

marco.r
03-12-2008, 15:26
in teoria non ci sono problemi, perche' le macro sono elaborate dal preprocessore, non dal compilatore. Dovresti indicare sia il sorgente della macro che come cerchi di usarla.

fero86
03-12-2008, 20:24
piu che altro infatti quello mi sembra un errore relativo ai parametri della macro: o si tratta di una macro che vuole dei parametri e lui non glieli sta passando, oppure il viceversa (piu probabile la prima).

PS: scusate se non scrivo le U accentate ma ho una tastiera inglese e per farle dovrei digitare Ctrl+Alt+U, ma se lo faccio l'editor di questo sito mi inserisce il tag BB code (U)(/U) :stordita:
mi sa che questa spiegazione dovrei metterla in firma.

Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.