Is there any way in pure C to implement a set?

Question:

I am doing work for college and I need to check word for word a "dictionary" in txt file and compare these words with the words of an array that was provided.

To make my life easier (since I'll have to find some way to make my program faster), is there, in C, the possibility of using variables of the set type? For example, the "sets" of Python. Or will I have to do everything "by hand"?

Answer:

Not directly, you're going to have to implement the data structure.

A library that already implements this is GNULib , but until you make it work you have already turned it around. It's only worth it for more intensive use, not for breaking a branch.

Scroll to Top