Thread: why does my program print off the wrong answers?

  1. #16
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    There's no point in having a dimenstion that is 1 in size. What use is there to have an array that contains one element? However, if you want to know how to initialize, at creation time, a three dimensional array...
    Code:
    int array[2][2][2] =
    {
        { { 1, 2 }, /* 0 */ { 3, 4 } /* 1 */ }, /* 0 */
        { { 5, 6 }, /* 0 */ { 7, 8 } /* 1 */ }  /* 1 */
    };
    [edit]Curses, foiled again! That's it, next time, no color for you![/edit]

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

  2. #17
    Registered User
    Join Date
    Jun 2004
    Posts
    21
    ok this is the type of array i need but i need to be able to have my data in it

    i have 8 different 11x6 matrixs that i need to put in to one array

  3. #18
    Registered User
    Join Date
    Jun 2004
    Posts
    21
    Quote Originally Posted by quzah
    There's no point in having a dimenstion that is 1 in size. What use is there to have an array that contains one element? However, if you want to know how to initialize, at creation time, a three dimensional array...
    Code:
    int array[2][2][2] =
    {
        { { 1, 2 }, /* 0 */ { 3, 4 } /* 1 */ }, /* 0 */
        { { 5, 6 }, /* 0 */ { 7, 8 } /* 1 */ }  /* 1 */
    };
    [edit]Curses, foiled again! That's it, next time, no color for you![/edit]

    Quzah.
    thanx thats what i needed and the color made it 100 times better thanx alot

    ~kl3pt0~

  4. #19
    Registered User
    Join Date
    Jun 2004
    Posts
    21
    with doing the arrays like that is there any files that i need to include cuz its only accepting data in that format.....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 10
    Last Post: 02-17-2005, 09:27 PM
  2. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  3. Replies: 1
    Last Post: 03-12-2002, 06:31 AM
  4. C++ program to print itself
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 11-27-2001, 02:25 PM
  5. Pretty Print Program
    By 2TheGrindStone in forum C++ Programming
    Replies: 5
    Last Post: 11-16-2001, 12:16 PM
Website Security Test