Results 1 to 4 of 4

Thread: 2d Array From File

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026

    2d Array From File

    How can I populate a Two-Dimensional Array from a file containing either data like this...

    98339336
    98393986
    90972661
    63525252
    63633377

    or this...

    9,8,3,3,9,3,3,6
    9,8,3,9,3,9,8,6
    9,0,9,7,2,6,6,1
    6,3,5,2,5,2,5,2
    6,3,6,3,3,3,7,7

    Thanks for ur help....

    Squirrelly1

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    How is that a 2D array ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026

    Simple

    This each number has a possition... the possition is defined by two values... x and y

    The 2D array contains the two values for each number in the data...

    for instance,

    98339336
    98393986
    90972661
    63525252
    63633377

    The bolded number would be.. Array(4,2) because its x value is 4 and its y value is 2...

    understand...

    thnx

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026
    Sorry, I messed up... it would be Array(3,1) because I would declare the array as..

    VB Code:
    1. Dim Array(0 to 7, 0 to 4)



    Gimme a break, it's been a long morning!!!


    Squirrelly1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width