Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: can be p[-1] dereferenced? Pin
sakthimuhuu24-Jun-14 2:11
sakthimuhuu24-Jun-14 2:11 
QuestionRe: can be p[-1] dereferenced? Pin
CPallini24-Jun-14 2:21
mveCPallini24-Jun-14 2:21 
AnswerRe: can be p[-1] dereferenced? Pin
Satya Chamakuri12-Aug-14 21:38
Satya Chamakuri12-Aug-14 21:38 
QuestionDirectShow not showing mp4 & WndProc Not working Pin
AmbiguousName20-Jun-14 1:23
AmbiguousName20-Jun-14 1:23 
AnswerRe: Can not Get Notification using WndProc Pin
Richard MacCutchan20-Jun-14 1:30
mveRichard MacCutchan20-Jun-14 1:30 
GeneralRe: Can not Get Notification using WndProc Pin
AmbiguousName20-Jun-14 2:04
AmbiguousName20-Jun-14 2:04 
GeneralRe: Can not Get Notification using WndProc Pin
Richard MacCutchan20-Jun-14 2:11
mveRichard MacCutchan20-Jun-14 2:11 
Questionswprintf_s with *wstring (Resolved) Pin
bkelly1319-Jun-14 6:39
bkelly1319-Jun-14 6:39 
Windows XP, Visual Studio 2008, C++

XML
bool procedure( wstring *target )
{...
int wrote_count = swprintf_s(
    text_to_log,
    MAX_SIZE,
    L"Target is %ls",
    target );
... }


The debugger shows text "Messsage" in variable target but text_to_log does not have that text.
text_to_log is declared as WCHAR text_to_log[ MAX_SIZE ] where MAX_SIZE is 400.
I have tried creating a local varible of type wstring and the text will copy from target to that local string. Using that local string in the printf statement produces the same result.

What do I need to change to incorporate the text from target into the text of text_to_log?
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com



modified 19-Jun-14 14:22pm.

QuestionRe: swprintf_s with *wstring Pin
David Crow19-Jun-14 6:54
David Crow19-Jun-14 6:54 
AnswerRe: swprintf_s with *wstring Pin
bkelly1319-Jun-14 7:11
bkelly1319-Jun-14 7:11 
QuestionRe: swprintf_s with *wstring Pin
David Crow19-Jun-14 9:53
David Crow19-Jun-14 9:53 
AnswerRe: swprintf_s with *wstring Pin
Graham Breach19-Jun-14 7:09
Graham Breach19-Jun-14 7:09 
GeneralRe: swprintf_s with *wstring Pin
bkelly1319-Jun-14 7:21
bkelly1319-Jun-14 7:21 
GeneralRe: swprintf_s with *wstring Pin
Richard MacCutchan19-Jun-14 23:28
mveRichard MacCutchan19-Jun-14 23:28 
QuestionCould not get the ConnectionString from Registry Key Pin
Member 1089437819-Jun-14 0:04
Member 1089437819-Jun-14 0:04 
SuggestionRe: Could not get the ConnectionString from Registry Key Pin
Richard MacCutchan19-Jun-14 0:35
mveRichard MacCutchan19-Jun-14 0:35 
GeneralRe: Could not get the ConnectionString from Registry Key Pin
Member 1089437819-Jun-14 22:42
Member 1089437819-Jun-14 22:42 
GeneralRe: Could not get the ConnectionString from Registry Key Pin
Richard MacCutchan19-Jun-14 23:26
mveRichard MacCutchan19-Jun-14 23:26 
GeneralRe: Could not get the ConnectionString from Registry Key Pin
Member 1089437820-Jun-14 4:00
Member 1089437820-Jun-14 4:00 
GeneralRe: Could not get the ConnectionString from Registry Key Pin
Richard MacCutchan20-Jun-14 4:08
mveRichard MacCutchan20-Jun-14 4:08 
QuestionRe: Could not get the ConnectionString from Registry Key Pin
David Crow20-Jun-14 4:43
David Crow20-Jun-14 4:43 
QuestionWriting to same console in MFC Pin
sma123#18-Jun-14 8:04
sma123#18-Jun-14 8:04 
QuestionRe: Writing to same console in MFC Pin
Richard MacCutchan18-Jun-14 22:23
mveRichard MacCutchan18-Jun-14 22:23 
AnswerRe: Writing to same console in MFC Pin
Albert Holguin26-Jun-14 4:50
professionalAlbert Holguin26-Jun-14 4:50 
QuestionIP spoofing Pin
Member 1089143217-Jun-14 19:33
Member 1089143217-Jun-14 19:33 

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.