[問題] CString Format 用法

看板C_and_CPP (C/C++)作者 (Rex)時間15年前 (2011/04/11 08:46), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) VS2005 C++ 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 問題(Question): 我想把位元資料寫入字串內 再由這個字串寫進Excel內 出錯程式碼在下面 希望有人可以解答 感謝各位 餵入的資料(Input): BYTE 資料 預期的正確結果(Expected Output): str要變成 "01"字串 錯誤結果(Wrong Output): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'void' (or there is no acceptable conversion) 程式碼(Code):(請善用置底文網頁, 記得排版) BYTE b; ........ str=string.Format("%02X", b); 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.128.90.1

04/11 09:11, , 1F
http://ppt.cc/VV3K 仔細看它的原型, 不能擺等號右邊
04/11 09:11, 1F

04/11 11:32, , 2F
多謝!以解^^
04/11 11:32, 2F
文章代碼(AID): #1Deazrhr (C_and_CPP)
文章代碼(AID): #1Deazrhr (C_and_CPP)