Problem is simple… I manually write .h and .cpp files, so sometimes I’m worried that ill declare a function and because of typing error or something Ill either define a different function or Ill completely forgett about it. So is there a tool that would recursively go through all may source folders and detect if pairs (SOMETHING.cpp and SOMETHING.h) have mismatches… I know that sometimes it is desired(or at lest I remember hearing that being a trick of some sort) but I would like to avoid it.
Share
When you attempt to use the function, you’ll get an error from the linker. Since you’re testing all of the functions you write (you are, I hope), you won’t be able to link the tests if you’ve a typo in the function name in the sources.
Another thing that can help: put your functions in a namespace. In the header, you’ll write
In the source, you don’t open the namespace, but specify it for each function:
If
myFunctionhasn’t been previously declared inMyNamespace, the compiler will complain.