Click here to Skip to main content
12,956,433 members (68,034 online)

ATL / WTL / STL

 
AnswerRe: CAsyncSocket Connect says in use Pin
pasztorpisti16-Sep-12 12:05
memberpasztorpisti16-Sep-12 12:05 
GeneralRe: CAsyncSocket Connect says in use Pin
bkelly1316-Sep-12 12:55
memberbkelly1316-Sep-12 12:55 
GeneralRe: CAsyncSocket Connect says in use Pin
pasztorpisti16-Sep-12 13:09
memberpasztorpisti16-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
pasztorpisti16-Sep-12 13:34
memberpasztorpisti16-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 Watt15-Sep-12 12:33
mentorPaul Watt15-Sep-12 12:33 
bkelly13 wrote:
Are there any versions of ...cpy...() and ...printf...() that limit the count of
characters copied to the space found in the destination string.  
Without an ungracefull app crash?


Unfortunately, No. Strcpy and printf are two of the most common functions that hackers use to exploit programming errors to "hack" into a program. When using these functions you need to pay extra attention to the size of your memory buffers and the actions you are performing on them.

You may have better luck with the C++ Standard Library.

The std::string class will manage your memory buffers, copies and concatenations.
std::cout doesn't have the program crash issues that you are running into.
All of my software is powered by a single Watt.

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 Watt15-Sep-12 15:45
mentorPaul Watt15-Sep-12 15:45 
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
pasztorpisti16-Sep-12 6:54
memberpasztorpisti16-Sep-12 6:54 
GeneralRe: better version of strcpy() and printf() Pin
Richard MacCutchan16-Sep-12 0:10
mvpRichard MacCutchan16-Sep-12 0:10 
AnswerRe: better version of strcpy() and printf() Pin
Richard Andrew x6415-Sep-12 17:01
memberRichard Andrew x6415-Sep-12 17:01 
AnswerRe: better version of strcpy() and printf() Pin
Richard MacCutchan16-Sep-12 0:09
mvpRichard MacCutchan16-Sep-12 0:09 
AnswerRe: better version of strcpy() and printf() Pin
pasztorpisti16-Sep-12 1:37
memberpasztorpisti16-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
mvpRichard 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 Watt14-Sep-12 15:36
mentorPaul Watt14-Sep-12 15:36 
GeneralRe: get a number into static text control Pin
Richard MacCutchan14-Sep-12 23:02
mvpRichard 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
mvpRichard MacCutchan15-Sep-12 5:42 
QuestionMirroring system imagelist Pin
huzifa3011-Sep-12 15:27
memberhuzifa3011-Sep-12 15:27 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 12 May 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid