Thread: problem!!!!!!!!!!!

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    78

    Smile problem!!!!!!!!!!!

    hi everyone,

    my problem is.


    i have one array called sta_arr.

    i.e. sta_arr[50]

    which has names of various stations.

    now each station has has some set of R values.
    for ex.
    sta_arr[1] has 11 no of "R" values


    now i want to take all the R values of each stations and store them .

    i have to do this in "c "

    HOW I CAN TAKE THEM

  2. #2
    Registered User
    Join Date
    Mar 2008
    Posts
    10
    How do you want to store them? As a number of R's, or as the R's themselves? It would help if we could get an idea. Also, what type is the sta_arr? Is it char, or a numerical type?

  3. #3
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    An array of linked lists? A 2-D array, if you know how large each list could be, maximum, and aren't afraid to waste space?

  4. #4
    Registered User
    Join Date
    Dec 2007
    Posts
    78
    i want each set of "R " to be associated with its corrusponding station name .

    sta_arr is a float array.

    Actually its just for identification of various stations

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I think we need to understand better what you are actually doing.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Registered User
    Join Date
    Dec 2007
    Posts
    78
    ok.
    for ex.

    sta [0]=1.0

    & this station has corrusponding "R values"

    e.g
    R=3.6,2.5,8.5,.........so on

  7. #7
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by chintugavali View Post
    ok.
    for ex.

    sta [0]=1.0

    & this station has corrusponding "R values"

    e.g
    R=3.6,2.5,8.5,.........so on
    So: do you know ahead of time how many R values there are (or at worst, the maximum there can be)? I have a sinking feeling that each R value is actually associated with traveling from one station to another; if so, then a 2-D array would be optimal: R[x][y] is the R-value for getting from x to y.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM