The code works fine in Visual Studio. (Remove #include <dtime.cpp> in the last line of 12-08.cpp)
Create an empty project and add .h/.cpp files to the project.
Since your error is generated in Visual Studio Code (which is different from Visual Studio). Please try to compile your code in Visual Studio. (Do not forget to install C++ workload in Visual Studio Installer)
For problems about Visual Studio Code, you could ask for help on GitHub.
Best regards,
Minxin Yu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.