Click here to Skip to main content
14,635,647 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Accessing HDD drive Pin
_Flaviu19-Apr-20 8:48
Member_Flaviu19-Apr-20 8:48 
GeneralRe: Accessing HDD drive Pin
JudyL_MD19-Apr-20 4:31
MemberJudyL_MD19-Apr-20 4:31 
Questionvoid type Pin
CalinNegru(fearless_)10-Apr-20 22:20
MemberCalinNegru(fearless_)10-Apr-20 22:20 
AnswerRe: void type Pin
Richard MacCutchan10-Apr-20 22:25
mveRichard MacCutchan10-Apr-20 22:25 
GeneralRe: void type Pin
CalinNegru(fearless_)10-Apr-20 22:44
MemberCalinNegru(fearless_)10-Apr-20 22:44 
GeneralRe: void type Pin
Richard MacCutchan10-Apr-20 23:18
mveRichard MacCutchan10-Apr-20 23:18 
GeneralRe: void type Pin
Member 798912211-Apr-20 1:22
MemberMember 798912211-Apr-20 1:22 
GeneralRe: void type Pin
CalinNegru(fearless_)11-Apr-20 10:25
MemberCalinNegru(fearless_)11-Apr-20 10:25 
GeneralRe: void type Pin
Member 798912211-Apr-20 11:36
MemberMember 798912211-Apr-20 11:36 
GeneralRe: void type Pin
Richard MacCutchan11-Apr-20 23:40
mveRichard MacCutchan11-Apr-20 23:40 
GeneralRe: void type Pin
Member 798912211-Apr-20 12:01
MemberMember 798912211-Apr-20 12:01 
Additional comment: In the 1980s, there was an intense discussion about whether a data item should provide information about its type or not. If the data item knows whether it is 8, 16, 32 or 64 bits, float or integer, or whatever, it is represented once, not in every single instruction operating on it. The instruction code would not need different formats (/additional bits) to distinguish between e.g. integer add and floating add. So instructions - of which there are usually a lot more than values - would be a lot more compact, and the risk of interpreting a value in the wrong format significantly reduced.

An essential element of this approach was to store index limits once, with the array. If every array access makes is own check against array limits, the code/data for this check could grow significantly - way beyond what you are aware of when reading the code for a single access. It looks so tempting, 'I do it only when there is a risk of exceeding the array limits, but save the check when there is not'. I am 100% sure that the compiler (or even runtine system) is a lot more clever than you to make that decision. In languages with runtime array (/object) descriptors, it is possible. In C, or C++ in classical C usage pattern, it is quite difficult.
GeneralRe: void type Pin
Greg Utas12-Apr-20 0:20
professionalGreg Utas12-Apr-20 0:20 
GeneralRe: void type Pin
leon de boer11-Apr-20 21:51
Memberleon de boer11-Apr-20 21:51 
GeneralRe: void type Pin
CalinNegru(fearless_)11-Apr-20 21:47
MemberCalinNegru(fearless_)11-Apr-20 21:47 
QuestionHow do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 5:57
MemberPotatoSoup6-Apr-20 5:57 
AnswerRe: How do I add listboxes to a back buffer and use that? Pin
Richard MacCutchan6-Apr-20 6:21
mveRichard MacCutchan6-Apr-20 6:21 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 6:46
MemberPotatoSoup6-Apr-20 6:46 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Richard MacCutchan6-Apr-20 7:04
mveRichard MacCutchan6-Apr-20 7:04 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 7:26
MemberPotatoSoup6-Apr-20 7:26 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Victor Nijegorodov6-Apr-20 8:24
MemberVictor Nijegorodov6-Apr-20 8:24 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 8:43
MemberPotatoSoup6-Apr-20 8:43 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Victor Nijegorodov6-Apr-20 8:49
MemberVictor Nijegorodov6-Apr-20 8:49 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 11:07
MemberPotatoSoup6-Apr-20 11:07 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
leon de boer6-Apr-20 21:06
Memberleon de boer6-Apr-20 21:06 
SuggestionRe: How do I add listboxes to a back buffer and use that? Pin
David Crow6-Apr-20 8:59
MemberDavid Crow6-Apr-20 8:59 

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.