re_bytes.GetString(bytes) 로 한번 해보시죠?
정구현 님이 쓰신 글 :
: void __fastcall TForm2::Timer1Timer(TObject *Sender)
: {
: bytes=soc->ReceiveData();
: String re_bytes;
: re_bytes = (String*)bytes;
: re_data = re_bytes; //문자열과 Byte
: Memo1->Lines->Add->(TEncoding::UTF8->GetString(bytes));
: re_data=Memo1->Text;
: if(re_data.Pos("y"))
: {
: cnt++;
: }
: }
: 여기서 re_data = re_bytes가 원래 re_data = bytes 였으나 String 변수와 TBytes 변수는 = 로 비교가 될수 없다는 에러가 뜨길래
: 이런 방식으로 bytes를 re_bytes 로 바꿔보려했으나
: [bcc32c Error] Unit2.cpp(63): cannot cast from type 'System::Sysutils::TBytes' (aka 'DynamicArray<unsigned char>') to pointer type 'System::String *' (aka 'System::UnicodeString *')
: 이런 에러가 뜹니다.
: 도와주시면 감사드리겠습니다.
|