Thread: array troubles

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    1

    array troubles

    hi everyone,
    how do i innitialize a two dimentional array and assign the number of eliments to zero?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    You can't assign the number of elements of an array to zero; whatever size you declare your array to be, that's what it will be.

    You can initialize an array when you declare it using an initaliizer list in curly braces.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 1-D array
    By jack999 in forum C++ Programming
    Replies: 24
    Last Post: 05-12-2006, 07:01 PM
  2. 2d array question
    By gmanUK in forum C Programming
    Replies: 2
    Last Post: 04-21-2006, 12:20 PM
  3. Template Array Class
    By hpy_gilmore8 in forum C++ Programming
    Replies: 15
    Last Post: 04-11-2004, 11:15 PM
  4. alotta Array troubles
    By caroundw5h in forum C Programming
    Replies: 13
    Last Post: 01-02-2004, 06:27 PM
  5. Help with an Array
    By omalleys in forum C Programming
    Replies: 1
    Last Post: 07-01-2002, 08:31 AM