4 ms·
Those aren't implicit because the "public interface" is the Object List, not the Data Structure List. struct list { float node; struct list *ne
by lalaithion 7y ago
Those aren't implicit because the "public interface" is the Object List, not the Data Structure List.
struct list {
float node;
struct list *next;
}
Above is the data structure; it implies operations.
Below is an interface (class, in the article); it implies data.
#define LIST_H
float index(struct list *ls, int i);
int find(struct list *ls, float x);
void sort(struct list *ls);