Thread: Array Help

  1. #1
    Registered User
    Join Date
    Jul 2003

    Array Help

    Hi All,
    I have an Input Array that I need to split into smaller arrays. But I don't know how many smaller arrays before hand. It might be 2, 3 maybe 400, I want to the program to be able to handle any number of smaller arrays, and I don't know the size of the smaller arrays until I process the Input Array. Do I need to declare a large number of arrays with a huge size and only use the ones I need? OR is there a way to dynamicly create these arrays? Thanks

  2. #2
    Chief Code Coloniser!
    Join Date
    Apr 2005
    Do some reading on ArrayLists. They can contain any object, including other ArrayLists. They're dynamic aswell, which means you don't need to know the size of them at the start.

    Good luck.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 05-29-2009, 07:25 PM
  2. Replies: 6
    Last Post: 11-09-2006, 03:28 AM
  3. [question]Analyzing data in a two-dimensional array
    By burbose in forum C Programming
    Replies: 2
    Last Post: 06-13-2005, 07:31 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM