Visual Studio 2022 - Community Edition
I would like versions of the C++ fstream, ifsteam, and ofstream classes that operate identically to the standard versions except that some of the functions they contain also call some custom functions I wrote. Is there any reasonable way to accomplish this? It seems there might be some way to "intercept" calls to the standard functions, execute my own code, then let the standard functions continue, but I don't know enough about C++ at that level to know how to do it or if it would even be possible. I'd like to do this for the class constructors and any other functions that open, read, write, or close files. I've toyed with possibly modifying the standard library header files themselves but I don't really want to open that can of worms. Any information would be greatly appreciated.