Click here to Skip to main content
15,917,565 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Sort digits of number Pin
Richard MacCutchan14-Jan-18 23:06
mveRichard MacCutchan14-Jan-18 23:06 
Questionconversion error Pin
Anonygeeker14-Jan-18 20:28
Anonygeeker14-Jan-18 20:28 
AnswerRe: conversion error Pin
Jochen Arndt14-Jan-18 21:19
professionalJochen Arndt14-Jan-18 21:19 
AnswerRe: conversion error Pin
Richard MacCutchan14-Jan-18 21:36
mveRichard MacCutchan14-Jan-18 21:36 
QuestionI couldn't think a good title for this.Simple question Pin
Emrah Duatepe14-Jan-18 7:37
Emrah Duatepe14-Jan-18 7:37 
AnswerRe: I couldn't think a good title for this.Simple question Pin
Jochen Arndt14-Jan-18 21:37
professionalJochen Arndt14-Jan-18 21:37 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe14-Jan-18 21:44
Emrah Duatepe14-Jan-18 21:44 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Jochen Arndt14-Jan-18 22:18
professionalJochen Arndt14-Jan-18 22:18 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe14-Jan-18 23:37
Emrah Duatepe14-Jan-18 23:37 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Jochen Arndt15-Jan-18 0:20
professionalJochen Arndt15-Jan-18 0:20 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe15-Jan-18 0:30
Emrah Duatepe15-Jan-18 0:30 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Jochen Arndt15-Jan-18 0:48
professionalJochen Arndt15-Jan-18 0:48 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe15-Jan-18 0:39
Emrah Duatepe15-Jan-18 0:39 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Jochen Arndt15-Jan-18 0:54
professionalJochen Arndt15-Jan-18 0:54 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe15-Jan-18 1:10
Emrah Duatepe15-Jan-18 1:10 
AnswerRe: I couldn't think a good title for this.Simple question Pin
Richard MacCutchan14-Jan-18 21:39
mveRichard MacCutchan14-Jan-18 21:39 
GeneralRe: I couldn't think a good title for this.Simple question Pin
Emrah Duatepe14-Jan-18 21:45
Emrah Duatepe14-Jan-18 21:45 
Questionfinding longest word Pin
Anonygeeker10-Jan-18 22:05
Anonygeeker10-Jan-18 22:05 
AnswerRe: finding longest word Pin
Richard MacCutchan10-Jan-18 22:25
mveRichard MacCutchan10-Jan-18 22:25 
GeneralRe: finding longest word Pin
Anonygeeker10-Jan-18 22:40
Anonygeeker10-Jan-18 22:40 
GeneralRe: finding longest word Pin
Richard MacCutchan10-Jan-18 22:46
mveRichard MacCutchan10-Jan-18 22:46 
GeneralRe: finding longest word Pin
Anonygeeker10-Jan-18 23:00
Anonygeeker10-Jan-18 23:00 
AnswerRe: finding longest word Pin
Jochen Arndt10-Jan-18 22:45
professionalJochen Arndt10-Jan-18 22:45 
AnswerRe: finding longest word Pin
CPallini10-Jan-18 23:31
mveCPallini10-Jan-18 23:31 
QuestionCString to CByteArray Pin
_Flaviu9-Jan-18 0:16
_Flaviu9-Jan-18 0:16 
Hi. I have a problem when I am trying to convert CString to CByteArray. Here is the code, and the result:
C++
	CByteArray arrByte2;
	BYTE* pByteArray = (PBYTE)(LPCTSTR)sSerial;
// sSerial is jwKMTAABtm9D3CTrm6bmDRzVgxeQY66FZE4SQSjyPlCyjJK7v8ICQM2qIiQgafSb5PDubf8PDVa4n+b4CAbZdFEd+M6CzjHwRqje3DtGSeU=
// pByteArray is jwKMTAABtm9D3CTrm6bmDRzVgxeQY66FZE4SQSjyPlCyjJK7v8ICQM2qIiQgafSb5PDubf8PDVa4n+b4CAbZdFEd+M6CzjHwRqje3DtGSeU=
	arrByte2.SetSize(sSerial.GetLength());
	memcpy(arrByte2.GetData(), pByteArray, m_sSerial.GetLength());
// pByteArray is jwKMTAABtm9D3CTrm6bmDRzVgxeQY66FZE4SQSjyPlCyjJK7v8ICQM2qIiQgafSb5PDubf8PDVa4n+b4CAbZdFEd+M6CzjHwRqje3DtGSeU=
// arrByte2 is jwKMTAABtm9D3CTrm6bmDRzVgxeQY66FZE4SQSjyPlCyjJK7v8ICQM2qIiQgafSb5PDubf8PDVa4n+b4CAbZdFEd+M6CzjHwRqje3DtGSeU=ýýýý««««««««


these values, sSerial, pByteArray and arrByte2 are taken from VS debugger.
Why arrByte2 are having "ýýýý««««««««" on tail ? What I am missing here ?
Thank you for any hint.

modified 9-Jan-18 6:25am.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.