User Profile

Collapse

Profile Sidebar

Collapse
samba
samba
Last Activity: Apr 5 '07, 07:38 AM
Joined: Mar 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • samba
    started a topic how to use memcpy to copy a structure into the buffer
    in C

    how to use memcpy to copy a structure into the buffer

    hi,
    struct msg
    {
    struct header ht;
    char buf[4096];
    }*mt;

    struct tlv
    {
    uint32_t tag;
    uint32_t len;
    char val[256];
    };
    struct tlvlist
    {
    uint32_t msglen;
    struct tlv *source;
    struct tlv *msgkey;
    struct tlv *delim;
    ...
    See more | Go to post

  • samba
    started a topic problem with array of stucture poiners
    in C

    problem with array of stucture poiners

    hi,please have a look at this program.
    struct tlv
    {
    uint32_t tag;
    uint32_t len;
    char val[256];
    };


    struct tlv *att;

    struct tlvlist
    {
    uint32_t msglen;
    struct tlv *source[2];
    struct tlv *mesgkey;
    struct tlv *delim;
    struct tlv *oper;
    };

    struct tlvlist *attlist;...
    See more | Go to post

  • samba
    started a topic problem with nested structures
    in C

    problem with nested structures

    I having a nested structures which are referenced with pointer variables
    Code:
    #include <stdio.h>
    struct test
    {
      int i;
      char *mytest;
    };
    struct sample
    {
      int k;
      struct test *test1;
    };
    int main()
    {
      struct sample *mysample;
      printf("Inside main method \n\n");
      mysample->k=0;
      mysample->test1->i=1;
    ...
    See more | Go to post
    Last edited by horace1; Mar 19 '07, 01:25 PM. Reason: added code tags
No activity results to display
Show More
Working...