Click here to Skip to main content
14,642,113 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: CAsyncSocket Connect says in use Pin
xenotron16-Sep-12 13:09
Memberxenotron16-Sep-12 13:09 
GeneralRe: CAsyncSocket Connect says in use Pin
bkelly1316-Sep-12 13:17
Memberbkelly1316-Sep-12 13:17 
GeneralRe: CAsyncSocket Connect says in use Pin
xenotron16-Sep-12 13:34
Memberxenotron16-Sep-12 13:34 
GeneralRe: CAsyncSocket Connect says in use Pin
bkelly1316-Sep-12 14:07
Memberbkelly1316-Sep-12 14:07 
Questionbetter version of strcpy() and printf() Pin
bkelly1315-Sep-12 10:02
Memberbkelly1315-Sep-12 10:02 
AnswerRe: better version of strcpy() and printf() Pin
Paul M Watt15-Sep-12 12:33
mentorPaul M Watt15-Sep-12 12:33 
GeneralRe: better version of strcpy() and printf() Pin
bkelly1315-Sep-12 15:34
Memberbkelly1315-Sep-12 15:34 
GeneralRe: better version of strcpy() and printf() Pin
Paul M Watt15-Sep-12 15:45
mentorPaul M Watt15-Sep-12 15:45 
I misunderstood part of your question.

There are these two functions:

strncpy(pDest, pSrc, size)

and

snprintf(pDest, count, pFormatStr, ...)

These will do what you are asking. Read the descriptions though, strncpy will not NULL terminate your string if it can't write all of the data to the buffer. This would open yourself up to another set of possibilities to crash your program.
All of my software is powered by a single Watt.

GeneralRe: better version of strcpy() and printf() Pin
bkelly1315-Sep-12 16:23
Memberbkelly1315-Sep-12 16:23 
GeneralRe: better version of strcpy() and printf() Pin
xenotron16-Sep-12 6:54
Memberxenotron16-Sep-12 6:54 
GeneralRe: better version of strcpy() and printf() Pin
Richard MacCutchan16-Sep-12 0:10
mveRichard MacCutchan16-Sep-12 0:10 
AnswerRe: better version of strcpy() and printf() Pin
Richard Andrew x6415-Sep-12 17:01
professionalRichard Andrew x6415-Sep-12 17:01 
AnswerRe: better version of strcpy() and printf() Pin
Richard MacCutchan16-Sep-12 0:09
mveRichard MacCutchan16-Sep-12 0:09 
AnswerRe: better version of strcpy() and printf() Pin
xenotron16-Sep-12 1:37
Memberxenotron16-Sep-12 1:37 
AnswerRe: better version of strcpy() and printf() Pin
Stephen Hewitt18-Sep-12 0:29
MemberStephen Hewitt18-Sep-12 0:29 
Questionget a number into static text control Pin
bkelly1313-Sep-12 17:05
Memberbkelly1313-Sep-12 17:05 
AnswerRe: get a number into static text control Pin
Richard MacCutchan13-Sep-12 21:52
mveRichard MacCutchan13-Sep-12 21:52 
GeneralRe: get a number into static text control Pin
bkelly1314-Sep-12 15:00
Memberbkelly1314-Sep-12 15:00 
GeneralRe: get a number into static text control Pin
Paul M Watt14-Sep-12 15:36
mentorPaul M Watt14-Sep-12 15:36 
GeneralRe: get a number into static text control Pin
Richard MacCutchan14-Sep-12 23:02
mveRichard MacCutchan14-Sep-12 23:02 
GeneralRe: get a number into static text control Pin
bkelly1315-Sep-12 5:14
Memberbkelly1315-Sep-12 5:14 
GeneralRe: get a number into static text control Pin
Richard MacCutchan15-Sep-12 5:42
mveRichard MacCutchan15-Sep-12 5:42 
QuestionMirroring system imagelist Pin
Huzifa Terkawi11-Sep-12 15:27
MemberHuzifa Terkawi11-Sep-12 15:27 
QuestionCAsyncSocket, first application Pin
bkelly139-Sep-12 5:26
Memberbkelly139-Sep-12 5:26 
AnswerRe: CAsyncSocket, first application Pin
Paul M Watt14-Sep-12 15:47
mentorPaul M Watt14-Sep-12 15:47 

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.