Link to home
Start Free TrialLog in
Avatar of Robert Silver
Robert SilverFlag for United States of America

asked on

what is the purpose of protos and PARAMS in the readline library

given:
file:  rlstdc.h:
#define PARAMS(protos) protos

how is this used in C++??
ASKER CERTIFIED SOLUTION
Avatar of Karrtik Iyer
Karrtik Iyer
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of sarabande
sarabande
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Correction in my previous comment
4> Now for code to be compatible with both ANSI standard as well as traditional C compiler, we use the PARAMS macro so that if it is ANSI C compiler when this macro is invoked as below,
int func(PARAMS(int foo))
it expands itself to
int func(int foo)