Click here to Skip to main content
15,892,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: UDP Sockets and Windows 10 Pin
Rick York28-Jun-17 6:57
mveRick York28-Jun-17 6:57 
GeneralRe: UDP Sockets and Windows 10 Pin
jeron128-Jun-17 7:16
jeron128-Jun-17 7:16 
AnswerRe: UDP Sockets and Windows 10 Pin
Rick York28-Jun-17 7:47
mveRick York28-Jun-17 7:47 
GeneralRe: UDP Sockets and Windows 10 Pin
Randor 28-Jun-17 8:00
professional Randor 28-Jun-17 8:00 
GeneralRe: UDP Sockets and Windows 10 Pin
leon de boer28-Jun-17 8:27
leon de boer28-Jun-17 8:27 
QuestionDirect creation of CWnd Object Pin
al250027-Jun-17 5:16
al250027-Jun-17 5:16 
AnswerRe: Direct creation of CWnd Object Pin
Victor Nijegorodov27-Jun-17 6:17
Victor Nijegorodov27-Jun-17 6:17 
AnswerRe: Direct creation of CWnd Object Pin
Victor Nijegorodov27-Jun-17 6:27
Victor Nijegorodov27-Jun-17 6:27 
GeneralRe: Direct creation of CWnd Object Pin
leon de boer27-Jun-17 6:49
leon de boer27-Jun-17 6:49 
GeneralRe: Direct creation of CWnd Object Pin
Victor Nijegorodov27-Jun-17 10:45
Victor Nijegorodov27-Jun-17 10:45 
GeneralRe: Direct creation of CWnd Object Pin
leon de boer27-Jun-17 19:49
leon de boer27-Jun-17 19:49 
GeneralRe: Direct creation of CWnd Object Pin
al250029-Jun-17 5:23
al250029-Jun-17 5:23 
GeneralRe: Direct creation of CWnd Object Pin
leon de boer29-Jun-17 6:25
leon de boer29-Jun-17 6:25 
QuestionHow to proceed and execute LDPC decoding using Data Structure in C Pin
Member 1326117526-Jun-17 21:15
Member 1326117526-Jun-17 21:15 
AnswerRe: How to proceed and execute LDPC decoding using Data Structure in C Pin
Richard MacCutchan26-Jun-17 22:59
mveRichard MacCutchan26-Jun-17 22:59 
AnswerRe: How to proceed and execute LDPC decoding using Data Structure in C Pin
leon de boer27-Jun-17 5:36
leon de boer27-Jun-17 5:36 
GeneralRe: How to proceed and execute LDPC decoding using Data Structure in C Pin
Member 1326117527-Jun-17 19:19
Member 1326117527-Jun-17 19:19 
QuestionDisecting a PE File, Revisited Pin
Bram van Kampen26-Jun-17 14:56
Bram van Kampen26-Jun-17 14:56 
Questionhow to use memset to fill a char array with space key? Pin
focusdoit25-Jun-17 3:01
focusdoit25-Jun-17 3:01 
AnswerRe: how to use memset to fill a char array with space key? Pin
leon de boer25-Jun-17 3:12
leon de boer25-Jun-17 3:12 
GeneralRe: how to use memset to fill a char array with space key? Pin
focusdoit25-Jun-17 3:53
focusdoit25-Jun-17 3:53 
GeneralRe: how to use memset to fill a char array with space key? Pin
harold aptroot25-Jun-17 4:03
harold aptroot25-Jun-17 4:03 
GeneralRe: how to use memset to fill a char array with space key? Pin
focusdoit25-Jun-17 4:11
focusdoit25-Jun-17 4:11 
GeneralRe: how to use memset to fill a char array with space key? Pin
harold aptroot25-Jun-17 4:23
harold aptroot25-Jun-17 4:23 
GeneralRe: how to use memset to fill a char array with space key? Pin
Rick York26-Jun-17 7:50
mveRick York26-Jun-17 7:50 
Here's the prototype for the function :
C++
int _snprintf( char *buffer, size_t count, const char *format, ... );

I usually use it like this :

C++
const size_t bufferSize = 127
char buffer[bufferSize+1] = {0};

_snprintf( buffer, bufferSize, "%3d    %s", index, yourString );

You can combine the _snprintf calls into one since they are going into the same memory buffer.

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.