a
splitData.h
- Committer:
- yuto17320508
- Date:
- 2019-02-20
- Revision:
- 0:ef757693b9f8
File content as of revision 0:ef757693b9f8:
/*intの数をchar型の欲しいbyte数に変換*/ #ifndef __INCLEDED_SPRITDATA_H #define __INCLEDED_SPRITDATA_H void Intobyte(int wannaChange,int byte,char *chardata,int firstElement); //指定されたbyte数のchar型に分解.最初の配列に下八桁が入る。一番左に符号(正だと0,負だと1)。 //例 wantChangeという変数の下23桁(3バイト)を、charnum[5]から順に入れたい。 // →Intobyte(wantChange,3,charnum,5); //これでcharnum[5]にwantChangeの下八桁,でcharnum[6]に下16桁、charnum[7]に下23桁が入り、charnum[7]の一番左に符号が入る。 #endif