[問題] 怎麼將字元轉數字再轉回去?
問題(Question):
如題,我寫了一個function packCharacter將char轉成unsignsd int
最後將char[0]|char[1]也轉成unsigned int
但題目要求要將char[0]|char[1]這個部分轉回2個字元
且要結合mask 65280 & mask 255來寫
抱歉,小魯的表達能力很差
附件內有原題目。
程式碼(Code):(請善用置底文網頁, 記得排版)
http://pastie.org/9800863
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 39.8.130.161
※ 文章網址: http://www.ptt.cc/bbs/C_and_CPP/M.1419700064.A.E00.html
推
12/28 13:09, , 1F
12/28 13:09, 1F
→
12/28 13:11, , 2F
12/28 13:11, 2F
→
12/28 17:43, , 3F
12/28 17:43, 3F
→
12/30 18:56, , 4F
12/30 18:56, 4F
推
01/01 14:50, , 5F
01/01 14:50, 5F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章