Click here to Skip to main content
15,891,951 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Retrieve the length of an int Pin
Perspx3-Aug-07 4:28
Perspx3-Aug-07 4:28 
AnswerRe: Retrieve the length of an int [modified] Pin
m.dietz3-Aug-07 4:16
m.dietz3-Aug-07 4:16 
GeneralRe: Retrieve the length of an int Pin
CPallini3-Aug-07 4:52
mveCPallini3-Aug-07 4:52 
AnswerRe: Retrieve the length of an int Pin
CPallini3-Aug-07 4:25
mveCPallini3-Aug-07 4:25 
GeneralRe: Retrieve the length of an int Pin
Perspx3-Aug-07 4:28
Perspx3-Aug-07 4:28 
GeneralRe: Retrieve the length of an int Pin
CPallini3-Aug-07 4:42
mveCPallini3-Aug-07 4:42 
GeneralRe: Retrieve the length of an int Pin
Perspx3-Aug-07 4:46
Perspx3-Aug-07 4:46 
GeneralRe: Retrieve the length of an int Pin
dburns3-Aug-07 5:00
dburns3-Aug-07 5:00 
Perspx wrote:
...don't manage resources well


Don't forget, memory is not the only resource a computer has. Sounds to me like you're wasting the CPU time (another resource) in order to save a few bytes of memory. It's hard to imagine a case where those few bytes would ever matter. There's also the factor of code complexity -- sounds like you're making your code more complex than it needs to be.

Since you're calculating size, I'd guess you're going to be allocating memory dynamically through malloc or new[] etc. Those schemes will add their own overhead which will swamp the few bytes you're aiming to save.


Perspx wrote:
Don't you agree?


In principal, yes, don't waste resources. However, I think you're going overboard in this case (the other posts seem to agree).
GeneralRe: Retrieve the length of an int Pin
Perspx3-Aug-07 5:02
Perspx3-Aug-07 5:02 
GeneralRe: Retrieve the length of an int Pin
Rage3-Aug-07 4:47
professionalRage3-Aug-07 4:47 
QuestionHack a modal dialog to not close? Pin
Jim @ JCT3-Aug-07 3:59
Jim @ JCT3-Aug-07 3:59 
AnswerRe: Hack a modal dialog to not close? Pin
Rage3-Aug-07 4:11
professionalRage3-Aug-07 4:11 
GeneralRe: Hack a modal dialog to not close? Pin
Jim @ JCT3-Aug-07 5:06
Jim @ JCT3-Aug-07 5:06 
QuestionHow recieve time from system time Pin
myshketer3-Aug-07 3:23
myshketer3-Aug-07 3:23 
QuestionRe: How recieve time from system time Pin
David Crow3-Aug-07 3:37
David Crow3-Aug-07 3:37 
AnswerRe: How recieve time from system time Pin
myshketer3-Aug-07 4:06
myshketer3-Aug-07 4:06 
QuestionRe: How recieve time from system time Pin
David Crow3-Aug-07 6:08
David Crow3-Aug-07 6:08 
AnswerRe: How recieve time from system time Pin
Rage3-Aug-07 4:15
professionalRage3-Aug-07 4:15 
QuestionApplication that makes EXE Pin
dacky3-Aug-07 2:36
dacky3-Aug-07 2:36 
AnswerRe: Application that makes EXE Pin
David Crow3-Aug-07 3:17
David Crow3-Aug-07 3:17 
AnswerRe: Application that makes EXE Pin
Hamid_RT3-Aug-07 3:37
Hamid_RT3-Aug-07 3:37 
GeneralRe: Application that makes EXE Pin
dacky5-Aug-07 19:24
dacky5-Aug-07 19:24 
GeneralRe: Application that makes EXE Pin
dacky5-Aug-07 19:25
dacky5-Aug-07 19:25 
GeneralRe: Application that makes EXE Pin
Hamid_RT5-Aug-07 19:46
Hamid_RT5-Aug-07 19:46 
AnswerRe: Application that makes EXE Pin
Iain Clarke, Warrior Programmer3-Aug-07 23:38
Iain Clarke, Warrior Programmer3-Aug-07 23:38 

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.