I have this in C++
unsigned char i_ch;
i_ch = szRecord[z_ct++]; - szRecord is a parameter I receive (string)
How can I do this in VB?
I get different values in C++ and VB when using the VB's Mid function?
Thanks,
Printable View
I have this in C++
unsigned char i_ch;
i_ch = szRecord[z_ct++]; - szRecord is a parameter I receive (string)
How can I do this in VB?
I get different values in C++ and VB when using the VB's Mid function?
Thanks,
Mid$ has an optional third parameter, the length of the string to return. If not specified the "rest of" the string is returned (from the specified starting position).
The other problem is the C++ array is 0 based while the Mid$ function is 1 based. So
Code:i_ch = szRecord[0]
'is the same as
i_ch = Mid$(szRecord, 1, 1)
Doesn't C convert the string to Unicode?
Because it looks different if viewed in C as oppose to VB