related to structure in c

Home Forums Programming Books and Reviews related to structure in c

This topic contains 0 replies, has 1 voice, and was last updated by  hasini 10 years, 3 months ago.

  • Author
    Posts
  • #2003

    hasini
    Member

    sir i  m facing a very strange problem in c langauge. just let me explain few things initially. I have defined astructure. after that i passed the pointer of this structure to the the function. Now when my code size is small ( i mean to say that when i am not including some other functions in my code) then it works fine. but as the code size increases some strange problem is creating, i.e. whenever i access one variable from the structure then its value becomes zero. this is happenning only with one variable and all other works fine. the type of that variable is unsigned long .
    and i am accessing that variable in the following manner
     
     temp=(*structure_name).variable;
    printf(“%d,%d,temp,(*structure_name).variable);
     
    at the o/p screen the value is
    0 0

You must be logged in to reply to this topic.

0 Shares
Share
+1
Tweet
Share
Stumble