Search:

Type: Posts; User: bandal27

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    3,460

    Laserlight, Can this be used for my kind of...

    Laserlight,
    Can this be used for my kind of structs too...?
  2. Replies
    9
    Views
    3,460

    Well... I meant to say copy the...

    Well...
    I meant to say copy the contents of the second struct to the first.
    There was a hurried typo.
  3. Replies
    9
    Views
    3,460

    hi, So far I am doing this to copy the...

    hi,
    So far I am doing this to copy the contents(which is working just fine), each time I need the values of the "first" renewed.



    n = malloc(sizeof(second));
    p = malloc(sizeof(first));
    ...
  4. Replies
    9
    Views
    3,460

    copy struct contents

    hi,
    How can I write a function to copy the contents of struct first to second ?


    typedef struct copyone{ char key[32];char value[32];}copyone,copytwo;
    typedef struct first{ char...
  5. Replies
    6
    Views
    2,071

    oh ok....Thank you for your response.

    oh ok....Thank you for your response.
  6. Replies
    6
    Views
    2,071

    single function multi sturct

    hi everyone,
    Can I make a single function accept different pairs of structures
    that will make the function process the data in similar way...?

    Thank you
  7. Replies
    13
    Views
    2,059

    hi Laserlight I understand what you are saying...

    hi Laserlight

    I understand what you are saying but I know for a fact that the rest of the functions are working fine....
    Important thing is....do you see anything wrong at first glance in this...
  8. Replies
    13
    Views
    2,059

    I have made a few minor syntax errors while...

    I have made a few minor syntax errors while trying to explain the problem to you guys....please over look it :-)
  9. Replies
    13
    Views
    2,059

    typedef structn ARRAY1{ char...

    typedef structn ARRAY1{
    char time[ARRAY_SIZE];
    char date[ARRAY_SIZE];
    }ARRAY1,ARR2;

    typedef struct first{
    char name[10];
    ARRAY1 *main;
    }first;
  10. Replies
    13
    Views
    2,059

    Hi, I cant copy the whole compiled code ... but...

    Hi,
    I cant copy the whole compiled code ...
    but can you see any problem in this code.






    typedef structn ARRAY1{
  11. Replies
    13
    Views
    2,059

    hi, Here is the original struct typedef...

    hi,
    Here is the original struct


    typedef struct{
    char time[ARRAY_SIZE];
    char date[ARRAY_SIZE];
    }ARRAY1, 2_ARRAY;

    typedef struct{
  12. Replies
    13
    Views
    2,059

    Sorry I meant to use only 1 %s... ...

    Sorry I meant to use only 1 %s...


    for(i=0; i < count; i++)
    {
    printf("%d %s \n", i,ptr->main[count].key);
    }
  13. Replies
    13
    Views
    2,059

    pointer printing

    hello friends,
    I am having a problem.

    This code works just fine when I print as soon as I assign the string to
    the pointer.


    ptr->main = malloc(sizeof(detail)*(660)+1);
    ...
  14. Replies
    26
    Views
    2,901

    yep got it...its working....thank you.

    yep got it...its working....thank you.
  15. Replies
    26
    Views
    2,901

    Can you help me with pointing the pointer I am...

    Can you help me with pointing the pointer
    I am not sure where to initialize the pointer.
  16. Replies
    26
    Views
    2,901

    Can you confirm if this line is correct? ...

    Can you confirm if this line is correct?

    strcpy(first_info.main[count].time,tokens[i]);
  17. Replies
    26
    Views
    2,901

    still getting the "test.c", line 136: syntax...

    still getting the
    "test.c", line 136: syntax error before or at: *
  18. Replies
    26
    Views
    2,901

    Yes i must have missed it when I substituted the...

    Yes i must have missed it when I substituted the array names...
    could you please substitute 2_ARRAY as ARR2
  19. Replies
    26
    Views
    2,901

    I have changed the names of the original...

    I have changed the names of the original structs....but here is the corrected one....



    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>
    #include<regex.h>

    #define ARRAY_SIZE 340
  20. Replies
    26
    Views
    2,901

    Here is the code I am trying to run ...

    Here is the code I am trying to run



    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>
    #include<regex.h>

    #define ARRAY_SIZE 340
  21. Replies
    26
    Views
    2,901

    Actually the line is in the main(). Its not in...

    Actually the line is in the main().
    Its not in any function.

    The code is too long.
  22. Replies
    26
    Views
    2,901

    CORRECTION.. this is the code having error ...

    CORRECTION..
    this is the code having error

    strcpy(first_info.main[count].time,tokens[i]);
    line 115: syntax error before or at: *
  23. Replies
    26
    Views
    2,901

    I am trying to get this to work. typedef...

    I am trying to get this to work.


    typedef struct{
    char time[ARRAY_SIZE];
    char date[ARRAY_SIZE];
    }ARRAY1, 2_ARRAY;

    typedef struct{
    char name[10];
  24. Replies
    26
    Views
    2,901

    thank you, Just one last question is the malloc...

    thank you,
    Just one last question is the malloc needed here...?
  25. Replies
    26
    Views
    2,901

    oh ok...whats the syntax for assigning time...

    oh ok...whats the syntax for assigning time through the "struct second"
Results 1 to 25 of 27
Page 1 of 2 1 2