RIght now the following information is in the header file C
RIght now, the following information is in the header file (C language).
# ifndef ArrayBagStack
# define ArrayBagStack
# define TYPE int
# define EQ(a, b) (a == b)
struct arrayBagStack {
TYPE data [100];
int count;
};
Question: The arrayBagStack structure is in the .h file and therefore exposed to the users of the data structure. How can we get around this problem?
Solution
Instead of declaring the struct in the header file, you can add a new function that includes and builds the struct in the implementation file.
