Can anyone tell me what this C statement means?
static uint8_t chess_storage(DM%2) host_response[14] ;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s not valid C, you can’t have a
%in that location. And you also can’t have that entirechess_storage(DM%2)thing in there, unless (possibly) it’s a macro that does something that you can do.This:
would declare
host_responseas an array of 14 8-bit unsigned integers (aka “bytes”).If we add this:
then the code becomes at least valid, substituting we get a call of the macro
chess_storagewith the argument1%2, which the preprocessor is able to compute. Since the macro is empty, that whole term will just go away, leaving the above array declaration.There are probably other more “artistic” macros possible, too.