Re: 關於版區文章列表

看板PttCurrent作者 (Co-a)時間21年前 (2004/08/10 20:48), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串11/11 (看更多)
※ 引述《ronald.bbs@ip-212-80-134-202.rev.dyxnet.com (朗奴)》之銘言: : 我那個unpack是這樣的 : $data = unpack("c33fname/crec/c14author/c6date/c65title/imoney/ : Cfilemode", $buffer); : 根據pttstruct.h, filemode是unsigned char, : 我無論我用C或c, 都一樣得不到正確的值 型態應該沒問題 但是要考慮到 C 語言的 struct 可能會有對齊的問題 怎麼知道是不是那個問題勒? 直接把unpack出來的東西, right or left shift算算看 假如正好可以算出原本的值, 就用 x 對齊一下位置(align) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.135.92.70
文章代碼(AID): #116CG5oV (PttCurrent)
討論串 (同標題文章)
文章代碼(AID): #116CG5oV (PttCurrent)