Array Woes / Bus Error

This is a discussion on Array Woes / Bus Error within the C++ Programming forums, part of the General Programming Boards category; CODE For the most part, my code seems good... I know there is something wrong, I just can't figure it ...

  1. #1
    Registered User lord's Avatar
    Join Date
    Dec 2006
    Posts
    61

    Array Woes / Bus Error

    CODE

    For the most part, my code seems good... I know there is something wrong, I just can't figure it out. Please try compiling it and notice the wrong output on array[1][3] and always wrong output on array[3][1]... also, sometimes it quits with a Bus Error...

    Thanks for any help/clues....

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    7,328
    The arrays have a size of 3, that means that indexes 0, 1 and 2 are valid. Index 3 is not valid and will cause errors if you try to use it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  2. How to monitor process creation?
    By markiz in forum Windows Programming
    Replies: 31
    Last Post: 03-17-2008, 02:39 PM
  3. Crazy errors caused by class, never seen before..
    By Shamino in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2007, 11:54 AM
  4. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 08:11 AM
  5. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21