Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Use a pointer, not value
ClientList* shared_memory; here ^ shared_memory = (ClientList* ) shmat (segment_id, 0, 0); and here ^
Ah, and then your sizeof will look like this
const int shared_segment_size = sizeof(ClientList);