I have a number of c++ projects were units were added. After working a while on these projects some of these units change into a .cpp file and a .h file with no connection between the two anymore.
When I click the header file in the "project manager", the .cpp file gets focus in the IDE. I have to right click on the .cpp source and choose "open source/header file" to open the header file. Normal behaviour in a unit is a set of tabs below the source window to choose between source and header.
How can I restore this?
The
.cppand.hfiles need to have the same base name, eg<name>.cppand<name>.h, for exampleUnit1.cppandUnit1.h. And the.hfile needs to have a header guard named<name>H, for exampleUnit1H. Then, the IDE will treat the files (and any associated<name>.dfmfile) as a single "unit".