Thread: bound checking in C/C++

  1. #1
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768

    bound checking in C/C++

    Can someone explain to me what is a bound checking, in C/C++ ?


    Thanks.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  2. #2
    root
    Join Date
    Sep 2003
    Posts
    232
    It's making sure that you don't write before index 0 or after index n-1 in an array.
    The information given in this message is known to work on FreeBSD 4.8 STABLE.
    *The above statement is false if I was too lazy to test it.*
    Please take note that I am not a technical writer, nor do I care to become one.
    If someone finds a mistake, gleaming error or typo, do me a favor...bite me.
    Don't assume that I'm ever entirely serious or entirely joking.

  3. #3
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    ohhh...


    thanks alot
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  4. #4
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    if you mean "BoundsChecker" by numega then it means much more than that. It notifies you of memory leaks, tells you about bad parameters to functions etc...
    it's great
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    But C/C++ does not natively do bounds checking on arrays. It assumes that if the programmer is using arrays he/she is smart enough not to write beyond its bounds.

    This allows compiled code to run much faster because the compiler can produce code that does not need error checking in it. The compiler basically does not have to babysit the programmer, unlike BASIC and some other languages that do native array bounds checking.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. bound checking problem
    By n3cr0_l0rd in forum C++ Programming
    Replies: 12
    Last Post: 06-16-2009, 11:04 AM
  2. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  3. Overflow and range checking for mul/div
    By Elysia in forum C++ Programming
    Replies: 28
    Last Post: 06-06-2008, 02:09 PM
  4. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 05:59 PM
  5. Problems about gcc installation
    By kevin_cat in forum Linux Programming
    Replies: 4
    Last Post: 08-09-2005, 09:05 AM