Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the built-in debugger macro in C++

Shulou Source: shulou.com Published: 2022-06-01 04:01:19 09月22日 Update

This article mainly shows you "how to use the built-in debugger macro in C++". The content is simple and clear. I hope it can help you solve your doubts. Now let the editor lead you to study and learn the article "how to use the built-in debugger macro in C++".

Use the built-in debug macro

In the process of program debugging, you often want to know which module is currently running, which function is smaller, which line is in the source file, and so on. If you add this information manually, it will undoubtedly put a great burden on programmers. Therefore, C++ provides several macros, _ _ FILE__, _ _ FUNCTION__, and _ _ LINE__, which you can use to "automatically" get information about modules, functions, and lines. Examine the following procedure.

# include using namespace std;void func1 () {cout

Tags: Caching information content programs articles functions variables modules learning help large tasks functions parameters names characters strings manual easy to understand more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Technology Xiaomi OPPO Reno MySQL