C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[75529] Re:RAD Studio TBytes String 질문입니다
라스코니 [chouoo] 2194 읽음    2019-08-20 12:31
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 *')
: 이런 에러가 뜹니다.
: 도와주시면 감사드리겠습니다.

+ -

관련 글 리스트
75525 RAD Studio TBytes String 질문입니다 정구현 2205 2019/08/17
75529     Re:RAD Studio TBytes String 질문입니다 라스코니 2194 2019/08/20
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.