Just wondering how to use CopyMemory like the PacketBuffer class uses it.
VB:
'MakeWORD
Dim Result As String * 2
CopyMemory ByVal Result, Value, 2
How do I do the String * 2 in C++, or is that not needed?
C++??
// If this is wrong please tell me why
char Result[1]; // 0-1 (2)?
CopyMemory( Result, Value, 2 );
WORD wValue = 0xabcd; // or unsigned int
BYTE bResult[2]; // or unsigned char / char.
memcpy(bResult, wValue, 2); // or CopyMemory.
edit: for arrays, the number inside the brackets indicates how many elements are in the array. the indeces of the array are from 0 to that number minus one.
int myarray[15]; has indeces of 0-14 for a total of 15 items.
Ok, thanks.
Blah and I knew about arrays too. That was just a stupid mistake. :(