To get and set various variables inside structs in C++The main struct object should be a pointer.the structs have got so many member function to get and set it variables from the user.finally the structs should be protected in such a way that no two users can change the details at same time..using mutex to avoid locking .Kindly help me to frame this code as i am a newbie in coding.
idnurr
0
Newbie Poster
Recommended Answers
Jump to PostEach set locks a mutex, then changes the variable, then unlocks the mutex. Make sure the struct's internal variables are private so only the set function can change them.
All 3 Replies
Moschops
683
Practically a Master Poster
Featured Poster
idnurr
0
Newbie Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.