As title!
In string operation, we usually transform char to AnsiString data type for BCB objects such as Edit, StringGrid, Memo and Label etc. Besides, AnsiString transform to char data type is also used for traditional file read/write. The codes could be written below (Success testing in BCB):
// AnsiString To Char
AnsiString as = "test";
char *chr;
chr = as.c_str();
// Char To AnsiString
char *chr="test";
AnsiString as;
as = StrPas(chr);
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言