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:(
  • Post a new comment

    Error

    default userpic
  • 14 comments