Home > Back-end >  Consult LPCWSTR string array parameter
Consult LPCWSTR string array parameter

Time:05-24

 
LPCWSTR Parts []={_T (" AAAA "), _T (" BBBBBBB "), _T (" CCCCCC ")};
int c;
C=sizeof (Parts)/sizeof (Parts [0]).
//c=3, calculate the correct

If as a parameter is calculated not to come out the correct number of string,
 
LPCWSTR Parts []={_T (" AAAA "), _T (" BBBBBBB "), _T (" CCCCCC ")};

The test (Parts)//passed as a parameter in

//function definition
The test (LPCWSTR Parts [])
{
int c;
C=sizeof (Parts)/sizeof (Parts [0]).//is always equal to 1,
}
  • Related