Encapsulation (computer programming): Difference between revisions

Content deleted Content added
As information hiding mechanism: Complete the C example
Line 85:
int ent_id; // ID number
char ent_name[20]; // Name
... (etc.)and other members ...
};
 
// API function implementations
struct Entity * open_entity(int id)
{ ... }
 
struct int process_entity(Entity *info)
{ ... }
 
struct void close_entity(Entity *info)
{ ... }
</source>