Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to egalise two strings Pin
garfaoui27-Jul-07 2:30
garfaoui27-Jul-07 2:30 
GeneralRe: How to egalise two strings Pin
ShilpiP27-Jul-07 2:47
ShilpiP27-Jul-07 2:47 
GeneralRe: How to egalise two strings Pin
toxcct27-Jul-07 2:54
toxcct27-Jul-07 2:54 
GeneralRe: How to egalise two strings Pin
ShilpiP27-Jul-07 3:06
ShilpiP27-Jul-07 3:06 
GeneralRe: How to egalise two strings Pin
toxcct27-Jul-07 3:12
toxcct27-Jul-07 3:12 
QuestionCheck if is valid pointer address? Pin
bosfan27-Jul-07 2:22
bosfan27-Jul-07 2:22 
AnswerRe: Check if is valid pointer address? Pin
sdancer7527-Jul-07 2:32
sdancer7527-Jul-07 2:32 
AnswerRe: Check if is valid pointer address? Pin
Mike Dimmick27-Jul-07 2:34
Mike Dimmick27-Jul-07 2:34 
In practice, you can't. The only way to know whether an address is valid is to try it; if not valid you'll get an access violation. That still won't tell you whether the pointer value actually points to what you expect it to.

The only answer is to be disciplined. Avoid pointer arithmetic whenever possible. Prefer using classes to raw data structures, so that bounds can be checked. Ensure all variables are initialised. Use smart pointers. Do these, and the chances of random memory corruption are much reduced.

Stability. What an interesting concept. -- Chris Maunder

AnswerRe: Check if is valid pointer address? Pin
CPallini27-Jul-07 2:51
mveCPallini27-Jul-07 2:51 
AnswerRe: Check if is valid pointer address? Pin
bosfan27-Jul-07 3:16
bosfan27-Jul-07 3:16 
AnswerRe: Check if is valid pointer address? Pin
Randor 27-Jul-07 4:42
professional Randor 27-Jul-07 4:42 
GeneralRe: Check if is valid pointer address? Pin
bosfan27-Jul-07 4:55
bosfan27-Jul-07 4:55 
GeneralRe: Check if is valid pointer address? Pin
Michael Dunn27-Jul-07 10:04
sitebuilderMichael Dunn27-Jul-07 10:04 
GeneralRe: Check if is valid pointer address? Pin
Michael Dunn27-Jul-07 10:04
sitebuilderMichael Dunn27-Jul-07 10:04 
QuestionCAsyncSocket::DoCallBack(WPARAM wParam, LPARAM lParam) Pin
xxblinux27-Jul-07 2:15
xxblinux27-Jul-07 2:15 
AnswerRe: CAsyncSocket::DoCallBack(WPARAM wParam, LPARAM lParam) Pin
Mike Dimmick27-Jul-07 2:36
Mike Dimmick27-Jul-07 2:36 
AnswerRe: CAsyncSocket::DoCallBack(WPARAM wParam, LPARAM lParam) Pin
xxblinux27-Jul-07 16:33
xxblinux27-Jul-07 16:33 
Questiondifference b/w long pointer and pointer to string Pin
hari prasad sathpadi27-Jul-07 1:56
hari prasad sathpadi27-Jul-07 1:56 
AnswerRe: difference b/w long pointer and pointer to string Pin
toxcct27-Jul-07 2:34
toxcct27-Jul-07 2:34 
AnswerRe: difference b/w long pointer and pointer to string Pin
Nemanja Trifunovic27-Jul-07 2:42
Nemanja Trifunovic27-Jul-07 2:42 
AnswerRe: difference b/w long pointer and pointer to string Pin
Mike Dimmick27-Jul-07 2:44
Mike Dimmick27-Jul-07 2:44 
QuestionHow to egalise two strings Pin
garfaoui27-Jul-07 0:16
garfaoui27-Jul-07 0:16 
AnswerRe: How to egalise two strings Pin
GameProfessor27-Jul-07 0:20
GameProfessor27-Jul-07 0:20 
GeneralRe: How to egalise two strings Pin
garfaoui27-Jul-07 0:23
garfaoui27-Jul-07 0:23 
AnswerRe: How to egalise two strings Pin
F.Falk27-Jul-07 0:24
F.Falk27-Jul-07 0:24 

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.