![]() |
|
#1
|
|||
|
|||
Problem relating to ArraysHello everyone,
Can over running of array lead to the catastrophic failures? The answer to this is may be YES I think. Then why does not C++ provide bound checking on array operations and who is responsible to prevent array overruns? |
|
#2
|
|||
|
|||
Re: Problem relating to ArraysQuote:
Quote:
I believe that the designer of the language wanted a simple powerful language (somewhat higher-level than assembly language, but still simple) that could be used to write operating systems. The run-time overhead of checking for out-of-bounds array references (or any other kind of reference to invalid memory addresses) was considered too expensive in terms of program CPU usage (running time) and memory use efficiency. Therefore, such niceties were not built into the language. (Maybe someone else has some more meaningful insight into this. I would be interested in other opinions.) The program designer and coder is (are) responsible for implementing programs that can not indulge in undefined behavior. Regards, Dave |
|
#3
|
||||
|
||||
Re: Problem relating to ArraysQuote:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
Recent GIDBlog
Welcome to Baghdad by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Runtime Problem involving "printf" in C Program | supamakia | C Programming Language | 2 | 09-Oct-2005 10:09 |
| C++ Syntax Problem (Arrays and Loops) | rpgaction | C++ Forum | 5 | 01-Sep-2005 02:25 |
| a significant problem after installing Xp | mohammad | Computer Software Forum - Windows | 10 | 09-Aug-2005 07:03 |
| Noob question on c arrays and functions | brett | C Programming Language | 1 | 20-Apr-2005 03:59 |
| problem with arrays | melas | C Programming Language | 5 | 12-Oct-2004 04:18 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The