Click here to Skip to main content
15,900,589 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Strange problem Pin
Christian Graus17-Jul-02 18:11
protectorChristian Graus17-Jul-02 18:11 
Generalwinsock or CSocket Pin
zecodela17-Jul-02 17:22
zecodela17-Jul-02 17:22 
GeneralRe: winsock or CSocket Pin
Greven17-Jul-02 17:57
Greven17-Jul-02 17:57 
GeneralRe: winsock or CSocket Pin
Masaaki Onishi18-Jul-02 6:14
Masaaki Onishi18-Jul-02 6:14 
GeneralRe: winsock or CSocket Pin
zecodela20-Jul-02 2:55
zecodela20-Jul-02 2:55 
GeneralNull'ing structures Pin
Marc Richarme17-Jul-02 17:18
Marc Richarme17-Jul-02 17:18 
GeneralRe: Null'ing structures Pin
gekoscan17-Jul-02 17:43
gekoscan17-Jul-02 17:43 
GeneralRe: Null'ing structures Pin
Scot Brennecke17-Jul-02 19:04
professionalScot Brennecke17-Jul-02 19:04 
It's all about making readable code for yourself and others, weeks after you write it.
= {0} works. But it's not as obvious that the entire structure will be zeroed.
ZeroMemory usually gets compiled as memset with 0, but ZeroMemory is much clearer to read.

Back in the days when drive space and memory was expensive, it paid to write very small source code. We learned to be VERY thrifty with every byte, at the expense of readability. But the cost of maintenance should not be underestimated. If you can save another programmer just 2 minutes by making the code easier to read and understand, you've justified the use of a few extra bytes of source code.


Scot Brennecke
Software Developer
VC++ MVP
GeneralRe: Null'ing structures Pin
Marc Richarme17-Jul-02 20:12
Marc Richarme17-Jul-02 20:12 
GeneralRe: Null'ing structures Pin
Scot Brennecke17-Jul-02 20:34
professionalScot Brennecke17-Jul-02 20:34 
GeneralRe: Null'ing structures Pin
Marc Richarme20-Jul-02 6:17
Marc Richarme20-Jul-02 6:17 
QuestionWhy does windows database programming have to be so hard? Pin
Anonymous17-Jul-02 13:14
Anonymous17-Jul-02 13:14 
AnswerRe: Why does windows database programming have to be so hard? Pin
Matt Gullett17-Jul-02 13:53
Matt Gullett17-Jul-02 13:53 
GeneralWinsock Pin
Ken Mazaika17-Jul-02 13:08
Ken Mazaika17-Jul-02 13:08 
GeneralRe: Winsock Pin
Nish Nishant17-Jul-02 15:24
sitebuilderNish Nishant17-Jul-02 15:24 
GeneralRe: Winsock Pin
Masaaki Onishi18-Jul-02 6:18
Masaaki Onishi18-Jul-02 6:18 
GeneralDebugging help reqd. Pin
User 988517-Jul-02 12:18
User 988517-Jul-02 12:18 
GeneralRe: Debugging help reqd. Pin
Chris Losinger17-Jul-02 12:43
professionalChris Losinger17-Jul-02 12:43 
GeneralRe: Debugging help reqd. Pin
benjymous18-Jul-02 0:48
benjymous18-Jul-02 0:48 
GeneralASSERT and Windows XP Problem Pin
Justin Cooke17-Jul-02 11:23
Justin Cooke17-Jul-02 11:23 
GeneralRe: ASSERT and Windows XP Problem Pin
Bugra Barin17-Jul-02 13:40
Bugra Barin17-Jul-02 13:40 
GeneralRe: ASSERT and Windows XP Problem Pin
Justin Cooke18-Jul-02 3:22
Justin Cooke18-Jul-02 3:22 
GeneralShellapi.h in the wrong ver... Pin
BlackSmith17-Jul-02 10:45
BlackSmith17-Jul-02 10:45 
GeneralRe: Shellapi.h in the wrong ver... Pin
User 665817-Jul-02 11:16
User 665817-Jul-02 11:16 
GeneralRe: Shellapi.h in the wrong ver... Pin
Joaquín M López Muñoz17-Jul-02 11:18
Joaquín M López Muñoz17-Jul-02 11:18 

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.