Click here to Skip to main content
15,886,782 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: void type Pin
Richard MacCutchan10-Apr-20 22:25
mveRichard MacCutchan10-Apr-20 22:25 
GeneralRe: void type Pin
Calin Negru10-Apr-20 22:44
Calin Negru10-Apr-20 22:44 
GeneralRe: void type Pin
Richard MacCutchan10-Apr-20 23:18
mveRichard MacCutchan10-Apr-20 23:18 
GeneralRe: void type Pin
kalberts11-Apr-20 1:22
kalberts11-Apr-20 1:22 
GeneralRe: void type Pin
Calin Negru11-Apr-20 10:25
Calin Negru11-Apr-20 10:25 
GeneralRe: void type Pin
kalberts11-Apr-20 11:36
kalberts11-Apr-20 11:36 
GeneralRe: void type Pin
Richard MacCutchan11-Apr-20 23:40
mveRichard MacCutchan11-Apr-20 23:40 
GeneralRe: void type Pin
kalberts11-Apr-20 12:01
kalberts11-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
leon de boer11-Apr-20 21:51 
GeneralRe: void type Pin
Calin Negru11-Apr-20 21:47
Calin Negru11-Apr-20 21:47 
QuestionHow do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 5:57
PotatoSoup6-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
PotatoSoup6-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
PotatoSoup6-Apr-20 7:26 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Victor Nijegorodov6-Apr-20 8:24
Victor Nijegorodov6-Apr-20 8:24 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 8:43
PotatoSoup6-Apr-20 8:43 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Victor Nijegorodov6-Apr-20 8:49
Victor Nijegorodov6-Apr-20 8:49 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 11:07
PotatoSoup6-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
leon 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
David Crow6-Apr-20 8:59 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 11:31
PotatoSoup6-Apr-20 11:31 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
Greg Utas6-Apr-20 12:39
professionalGreg Utas6-Apr-20 12:39 
GeneralRe: How do I add listboxes to a back buffer and use that? Pin
PotatoSoup6-Apr-20 12:52
PotatoSoup6-Apr-20 12:52 

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.