Click here to Skip to main content
15,922,145 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralInterfaces to other applications Pin
User 988520-Feb-03 12:57
User 988520-Feb-03 12:57 
GeneralRe: Interfaces to other applications Pin
Brian Olej20-Feb-03 13:52
Brian Olej20-Feb-03 13:52 
GeneralRe: Interfaces to other applications Pin
User 988520-Feb-03 13:59
User 988520-Feb-03 13:59 
GeneralRe: Interfaces to other applications Pin
Brian Olej20-Feb-03 14:26
Brian Olej20-Feb-03 14:26 
GeneralRe: Interfaces to other applications Pin
Anders Molin20-Feb-03 14:07
professionalAnders Molin20-Feb-03 14:07 
GeneralRe: Interfaces to other applications Pin
User 988521-Feb-03 3:06
User 988521-Feb-03 3:06 
General"Try" to "Catch" without "Throw" Pin
Anton A. Loukine20-Feb-03 11:39
Anton A. Loukine20-Feb-03 11:39 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Dave Bryant20-Feb-03 11:51
Dave Bryant20-Feb-03 11:51 
There is no guarrantee that an access violation exception will be thrown when you read over the end of an array like that. The address beyond the end of the array may still be valid (i.e. it may contain another variable). Instead, use std::vector, and use the at() method to retrieve values. The at() method checks the array bounds, and throws an out_of_range exception if the bounds are exceeded. Alternatively, std::vector also provides the size() method, so you can do the range checking yourself, and then access the elements like a normal array using operator[].

Dave
GeneralRe: "Try" to "Catch" without "Throw" Pin
Anton A. Loukine20-Feb-03 11:58
Anton A. Loukine20-Feb-03 11:58 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Gary R. Wheeler20-Feb-03 14:36
Gary R. Wheeler20-Feb-03 14:36 
GeneralRephrasing the question Pin
Anonymous21-Feb-03 3:18
Anonymous21-Feb-03 3:18 
GeneralRe: Rephrasing the question Pin
jhwurmbach21-Feb-03 3:34
jhwurmbach21-Feb-03 3:34 
GeneralRe: Rephrasing the question Pin
Gary R. Wheeler21-Feb-03 11:22
Gary R. Wheeler21-Feb-03 11:22 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Chris Losinger20-Feb-03 12:06
professionalChris Losinger20-Feb-03 12:06 
GeneralRe: "Try" to "Catch" without "Throw" Pin
markkuk20-Feb-03 12:32
markkuk20-Feb-03 12:32 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Anton A. Loukine20-Feb-03 12:44
Anton A. Loukine20-Feb-03 12:44 
GeneralRe: "Try" to "Catch" without "Throw" Pin
jhwurmbach20-Feb-03 21:00
jhwurmbach20-Feb-03 21:00 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Anonymous21-Feb-03 3:19
Anonymous21-Feb-03 3:19 
GeneralRe: "Try" to "Catch" without "Throw" Pin
jhwurmbach21-Feb-03 3:49
jhwurmbach21-Feb-03 3:49 
GeneralRe: "Try" to "Catch" without "Throw" Pin
Christian Graus20-Feb-03 16:08
protectorChristian Graus20-Feb-03 16:08 
GeneralCopy opened files (read protected files) Pin
JGranborg20-Feb-03 11:37
JGranborg20-Feb-03 11:37 
GeneralCannot run MFC-compiled application on Win98se Pin
Valera24117620-Feb-03 11:21
Valera24117620-Feb-03 11:21 
GeneralRe: Cannot run MFC-compiled application on Win98se Pin
PJ Arends20-Feb-03 11:45
professionalPJ Arends20-Feb-03 11:45 
GeneralRe: Cannot run MFC-compiled application on Win98se Pin
Anonymous20-Feb-03 13:37
Anonymous20-Feb-03 13:37 
GeneralCString Array and Inserting Elements Pin
John W Hagen20-Feb-03 11:17
John W Hagen20-Feb-03 11:17 

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.