Skip to main content
Senior
November 12, 2024
Question

Seperation of concern regarding structures, headers.

  • November 12, 2024
  • 1 reply
  • 498 views

Hi, I have a CubeIDE project where I will be making multiple different structures. I had a question regarding suggestions on implementing these within the STM32 environment. I original made header files in c. However, I am now wondering whether STM recommends putting them in main.c or model.cpp instead. Is it recommended to make header files. And if so, is there a recommendation on making c vs cpp headers where they would be classes?

1 reply

Pavel A.
Super User
November 12, 2024

Generally, if you are not sure in such matters - ask your boss (team lead, software architect or how this is called in your company). 

If there is no one to ask - just recall that C is not "broken C++". Sharks and crocodiles are very ancient as well, but still alive and kicking.