In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "C++ code compilation and sentence sequence example analysis". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Now please follow the editor's train of thought slowly and deeply. Let's study and learn "C++ code compilation and sentence sequence example analysis"!
Debug tags are suitable for preprocessing # define to define one or more debug tokens, and the debug part is managed using # ifdef and # endif in the code. When the program is finally debugged, you only need to use the # undef tag, and the debug code will disappear. Commonly used debugging is marked as DEBUG, C++ code statement sequence:
# include
< assert>Using namsapce std; int main () {int iTunes 100; assert (iTunes 100); / / Fails} when debugging is finished, add # define NDEBUG before # include to eliminate the code generated by red}
The debug token at run time turns on and off the debug token while the program is running. This can be achieved by setting a debug bool tag. This is more convenient for programs run on the command line.
For example, the following C++ code:
# define DEBUG # ifdef DEBUG
The macro is in, when using assert, give him an argument, that is, an expression that is interpreted as true. The preprocessor generates code to test the assertion, and if the assertion is not true, it sends an error message telling what the assertion is and fails for a while, and the program terminates.
# include # include using namespace std; bool debug = false; int main (int argc,char*argv []) {for (int iTunes)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.