Expand|Select|Wrap|Line Numbers
- char Buffer[8192];
- unsigned short count = 512;
- char temp_char = 3, temp_char2 = 255;
- *(unsigned short*)(&Buffer[0]) = 1;
- *(unsigned short*)(&Buffer[2]) = count;
- Buffer[4] = temp_char;
- Buffer[5] = temp_char2;
Expand|Select|Wrap|Line Numbers
- deque<char> Buffer(8192);
- deque<char>::iterator buff_iter = Buffer.begin();
- unsigned short count = 512;
- char temp_char = 3, temp_char2 = 255;
- *buff_iter = 0; // High Byte
- buff_iter++;
- *buff_iter = 1; // Low Byte
- buff_iter++;
- *buff_iter = ((count >> 8) & 0xFF); // High Byte
- buff_iter++;
- *buff_iter = (count & 0xFF); // Low Byte
- buff_iter++;
- *buff_iter = temp_char;
- buff_iter++;
- *buff_iter = temp_char2;
Thanks!
Btw... I didn't actually attempt to compile this so it may not be 100% syntactically correct.