본문 바로가기

프로그래밍/폰트_문자열_인코딩

CString을 string으로 바꾸면서 해준 내용들...

// WriteFile( hParsedData, tempStr.GetBuffer( tempStr.GetLength() ), tempStr.GetLength(), &dwWrite, NULL );
WriteFile( hParsedData, tempStr.c_str(), tempStr.size(), &dwWrite, NULL );


CString tempStr2;
tempStr2 = tempStr.c_str();
pTool->m_lbLogView.AddString( tempStr2 );


//tempStr = pPacket->NMEA.Left( 6 );  // ?????
tempStr = pPacket->NMEA.substr( 0, 6 );


// pPacket->NMEA = tempBuffer;
pPacket->NMEA.clear();
pPacket->NMEA.replace( 0, sizeof( tempBuffer )-1, (char*) tempBuffer );


//wcstombs( (char*) tempBuffer, tempStr, tempStr.GetLength() );
sprintf( tempBuffer, "%s", tempStr.c_str() );

 //CString   NMEA;
 std::string  NMEA;


주석 처리된 (//) 부분이 CString으로 만든 문자열을 처리하기 위한 코드
그 밑에가 string으로 바꾼뒤 사용한 코드



Calendar
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Visits
Today
Yesterday