Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

phusnikn

How do I Access a struct member from another struct ??

This topic is 5754 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys im playing with libsam LSCI''s File system library it has a struct wiht the following time_t creation; time_t residence_time; struct sam_copy_s copy[MAX_ARCHIVE]; uchar_t cs_algo; uchar_t flags; ulong_t gen; Problem is I''m having difficulties accessing the sam_copy_s struct how would I access this im using Sun Forte C/C++ 6.0 Compiler using Solaris, I havent used C in a very long time thanks for your time. im doing something like struct sam_stat samst; sam_stat("/netb/file1",&samst,sizeof(struct sam_stat)+1); now how do I go about pulling the info from sam_copy_s ?? Thanks for your help guru''s :-) - RB

Share this post


Link to post
Share on other sites
Advertisement
samst.copy;       // access entire array; returns pointer to first element
samst.copy[ n ]; // access specific element in array

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!