On Thu, 2008-01-31 at 10:34 +0000, Paul Herring wrote:
> On Jan 31, 2008 10:29 AM, aiqur11 <[EMAIL PROTECTED]> wrote:
> 
> Please ask your questions in the body of your messages.
> 
> [from subject] Can over running of array lead to the catastrophic
> failures?
> 
> Yes.
> 
> > If `Yes' then why does not C++ provide bound checking on array
> > operations
> 
> Because arrays are supposed to be 'fast,' and such checking is slow.
> If you want bounds checking, use vectors or one of the other
> containers available in C++.
> 
> > and who is responsible to prevent array overruns?
> 
> You are.
> 

Plus C/C++ have few constraints preventing you from messing yourself
over. Hence it's a double edge sword. You are unrestricted, but you can
really hose yourself.

There are many other languages that have some nice babysitting abilities
making sure your code plays nice. Java comes to mind.


> -- 
> PJH
> 
> http://shabbleland.myminicity.com/ind
> 
> 
> 
>  

Reply via email to