Advertisement Jump to content


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


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

This topic is 5939 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
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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!