Home Forums Programming Books and Reviews related to structure in c

Viewing 0 reply threads
  • Author
    Posts
    • #2003
      Anonymous
      Inactive

      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

Viewing 0 reply threads
  • The forum ‘Programming Books and Reviews’ is closed to new topics and replies.