Serge SB (serge_sb) wrote in cpp,
Serge SB
serge_sb
cpp

Passing an array of constants to function

Assume we have a function CheckSomething(BYTE baParams[]). Then we can call it like this:

BYTE baMyParams[] = {0x21,0x35};
CheckSomething(baMyParams);

Question is: how to pass an array of values without using extra variables? Something like CheckSomething({0x21,0x35})? - this doesn't work:(
Subscribe
  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 14 comments