推 goodsheng: 謝謝f大的回覆,有收到您的信。我有試過您的方法OK! 09/19 11:38
方法一、
char *buf="ABCDEF";
方法二、
AnsiString str="ABCDEF";
char *buf=str.c_str();
在此之後,buf[0]='A', buf[1]='B', 以此類推
※ 引述《goodsheng (恩哈哈)》之銘言:
: 開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
: Borland C++ 6 Builder
: 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
: 無
: 問題(Question):
: 字串內容是否可以轉為陣列表示
: 餵入的資料(Input):
: 字串 BUF = "ABCDEF"
: 預期的正確結果(Expected Output):
: 轉為矩陣 BUF[6] = {A,B,C,D,E,F}
: 以上需尋求協助,謝謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 219.85.138.85
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1442555631.A.1DF.html