Array Help

This is a discussion on Array Help within the C# Programming forums, part of the General Programming Boards category; Hi All, I have an Input Array that I need to split into smaller arrays. But I don't know how ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    53

    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
    Posts
    121
    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, 08: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, 08:31 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 10:54 AM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 08:48 PM

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