Compile-Error in Daily

Hello there,

All my dayly tests give me this error. Somebody got an idea whats wrong?
When I test the public tests it compiles.



it seems to me that you didn’t implement the actual struct for the trie data structure. You implemented the necessary functions to work with the trie but you do not have any declaration of the struct tree. You also have a trie.h and a dict.h which have the same content, so having dict.h is enough.

Hope this helps,


i thought of something liked that and deleted trie.h some pushes ago but its still there? Do I need to explicit delete it while pushing?

You also have to push the delete in that sense, yes.

$ git rm (file)

$ git commit -m “Deleted the file from the git repository”

$ git push

These commands should help you accomplish that. Be aware that they will also remove the file from your hard drive.

Thank u very much, ill give it a try!

To make sure, this does not happen, but to still remove it from the remote, run

$ git rm --cached (file)

Hey, I have noticed, that your wordl.c is missing the e. My perception of .c and .h files was, that the name infront of the dot/"." should be the same, no? If that’s not the mistake, ignore this. Why do you have a guess variable, when there even is a function called guess? I would remove such ambiguities by replacing it with names that are not function names. If you have the function create() already implemented, why don’t you use it to create the Trie * node? It seems to me though, that your Trie struct is missing a keyword. your dict.h gives you the right functions to implement the Trie datastructure. Are you including this in your trie.c? (Once again, why is the corresponding name of your .c and .h different from one another? Though, this might not be a problem in itself?)

The header files describe the interface and the source files the implementation.
It is often the case in repositories (especially those with source and headers in the same folder) to have FILE.c implementing the interface of FILE.h.
This is in part to avoid confusion with a clear distinction and can also be seen as a primitive object-oriented programming style:
We have one object with methods to interact with (be it a trie or a wordle game). This one object consists of a unit with an interface and (hidden to the outside) implementation.
But that said, there is no restriction to forbid you from having different names for the source and header files.
For instance, for the dictionary, it might be appropriate to name the source file trie.c as the dictionary describes a general set data structure that might be implemented in many ways:

  • linear list
  • binary list
  • hashset (see later in the course)
  • binary search tree
  • trie
  • …

The implementation trie.c is then one concrete realization of this interface using tries (which are quite nice to implement in C).

The code might be in create where you can not use create to create the trie.

dict.h defined typedef struct Trie Trie; to be able to use Trie alone without struct.
One can then create a struct Trie ... in the source file but already use Trie without struct.

1 Like