Thread: function definition with macros

  1. #1
    Registered User
    Join Date
    Oct 2004

    function definition with macros

    hi all...

    i was handed a job to fix some c code and while i have programed many years using other languages i cant figure this one out and could not find anything on line.

    supposing the SOAP_FMAC5 and SOAP_FMAC6 are macros how would the definition of this function read?

    SOAP_FMAC5 struct SOAP_ENV__Fault * SOAP_FMAC6 soap_new_SOAP_ENV__Fault(struct soap*, int);

    in this case both macros appears to be defined as just place holders. there are no values or structures attached to those. but what if there were? how would those affect the function definition?


  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Who knows? What kind of a name is FMAC5? "Function macro #5"?

    Anyway they could possibly expand to qualifiers -- 5 might be extern "C", or const, or maybe extern or static.

  3. #3
    Registered User
    Join Date
    Oct 2004
    does that mean that the options of what those macros can be are "somewhat" limited?
    i mean as far as how much can you cram into a function definitions in c/c++?!

    the current state of the macros is:
    #ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */
    # define SOAP_FMAC5

    which means to me that with them or without them the definition is basically:
    struct SOAP_ENV__Fault * soap_new_SOAP_ENV__Fault(struct soap*, int);

    which to me means that it returns a pointer to a structure of type SOAP_ENV__Fault... am i right?


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Needs help in Dev-C++
    By Korrupt Lawz in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2010, 01:17 AM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  5. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM