multiway read\write struct

This is a discussion on multiway read\write struct within the C Programming forums, part of the General Programming Boards category; hi all, I've a problem working with structs. So, I've some struct with few objects. And I gotta renew only ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    77

    multiway read\write struct

    hi all,
    I've a problem working with structs.
    So, I've some struct with few objects. And I gotta renew only one object when another objects will be constant while issues application in the working process. This struct to fill from getopt.
    For example me need parse cli like this..
    ./prg -i 100a-150a -v 00:07:F6:6E:53:E9
    Where '100a-150a' it's id. It would be like this in object id 100a, 101a,...,150a, when value wold be constant with either id.
    Code:
    struct my {
    char *id;
    char value;
    I might parse like this cli
    ./prg -i 100a -v 00:07:F6:6E:53:E9
    But I'm embarrassed to do it with interval of value.

  2. #2
    Registered User
    Join Date
    Jan 2007
    Location
    Euless, TX
    Posts
    144
    You've had at least 2 dozen (and more) people look at this post and no replies. I strongly believe it's due to ALL of us being unable to understand what your problem is and what you are trying to accomplish. Try wording your problem so ANYONE could understand it.

  3. #3
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,058
    Concur with the previous poster, be more clear in asking questions.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Segfault with Linked List Program
    By kbrandt in forum C Programming
    Replies: 1
    Last Post: 06-23-2009, 08:13 AM
  2. Global Variables
    By Taka in forum C Programming
    Replies: 34
    Last Post: 11-02-2007, 04:25 AM
  3. Replies: 10
    Last Post: 05-19-2006, 12:23 AM
  4. What's wrong with my search program?
    By sherwi in forum C Programming
    Replies: 5
    Last Post: 04-28-2006, 10:57 AM
  5. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 03:58 PM

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