array of int

This is a discussion on array of int within the C++ Programming forums, part of the General Programming Boards category; why is this line: Code: int GroupSize[3] = { 6, 1, 0 }; makes my program crash? this line appears ...

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    98

    array of int

    why is this line:
    Code:
    int GroupSize[3] = { 6, 1, 0 };
    makes my program crash?
    this line appears outside winmain if it matters

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    It isn't that line. It's something else in your program, and it just appears to be that line. This is a common issue with you trashing memory some place. It just appears to be that line, call it luck.

    If you don't believe me, compile this:
    Code:
    int main( )
    {
        int GroupSize[3] = { 6, 1, 0 };
        return 0;
    }
    Now run it. Does it crash? No. That means that is not the problem line.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    98
    oh, you right =) did some tests and solve it out. thakns.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  2. Need help understanding info in a header file
    By hicpics in forum C Programming
    Replies: 8
    Last Post: 12-02-2005, 11:36 AM
  3. problem with sorting
    By pinkpenguin in forum C Programming
    Replies: 2
    Last Post: 11-18-2005, 10:06 AM
  4. getting a headache
    By sreetvert83 in forum C++ Programming
    Replies: 41
    Last Post: 09-30-2005, 05:20 AM
  5. easy if you know how to use functions...
    By Unregistered in forum C Programming
    Replies: 7
    Last Post: 01-31-2002, 06:34 AM

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