What is the use case for the 'include' folder?


I have a hard time understanding what the use case is for the “include” folder in the project tree structure. I usually have both my .cpp and my .h in the src. I think this is the standard way of doing it, right? In this case, my include folder is always empty.

  • is there a problem with this approach / is this bad practice?
  • in this case, why is there an include folder at all / what should go there / what is the use case for the include folder?


You can/should/are advised to put headers into include but it’s not mandatory. Some developers I know always do, some don’t, me? I sometimes do – depending on my mood! :wink:

I suspect the structure created by PlatformIO gives people the option, plus, the include directory is guaranteed to be on the -I list of directories to search for headers. As is src.