私は学んでおり、次の配列コピーを実行するための最良の方法を知りたいのですが、このコードを検討してください。
void Cast1LineSpell(UINT Serial, char *chant)
{
byte packet[] = { 0x0F, 0x03,
(Serial >> 24) & 0xFF, (Serial >> 16) & 0xFF,(Serial >> 8) & 0xFF, Serial & 0xFF,
0x9A, 0x92, 0x00, 0x00, 0x00, 0x1A };
byte prepareSpell[2] = { 0x4D, 0x01 };
byte chant_length = sizeof(chant) / sizeof(chant[0]);
byte chant_name[] = { 0x4E, chant_length, }; // <= how can i put the bytes in chant* into the rest of this array, and then append bytes 0x00 and 0x4E on to the end of it?
}
の中にあるバイトを*chant
入れて、最後に入れて、最後にバイトをchant[]
追加するにはどうすればよいですか?0x00
0x4E
誰かが解決策を提供できますか?とても有難い。