In most cases, we can use breakpoints in vs.net to solve debugging problems. However, in some cases, you may need to manually output some information for debugging reference. Have you ever completed the debugging, forgot to delete an output
In gnu c, macros can accept variable parameters, just like functions, such:# Define pr_debug (fmt, arg ...)/Printk (KERN_DEBUG fmt, # arg)
Use variadic macros to transmit Variable Parameter tables You may be familiar with Using Variable Parameter
Preprocessing commands in C #As a pair in Preprocessing: # Region name, # endregionIt may be the most widely used by everyone.CodeIn a long CS file, this is indeed a good way to make the code clearer. vs also uses this to automatically include the
Compiler built-in macros:
First, we will introduce several built-in macro definitions of the compiler. These macro definitions can not only help us write cross-platform source code, but also help us output useful debugging information flexibly.
The
Preface:
When writing a program, we always add some printf and other statements to output debugging information, however, the most inconvenient part of the printf statement is that when we need to release a program, we need to delete these
In GNU C, a macro can accept a variable number of arguments, just like a function, such as:
12
#define pr_debug(fmt,arg...) \ printk(KERN_DEBUG fmt, ##arg)
Passing variable parameter tables with variable-parameter
GCC supports complex macros, which use a different syntax so that you can give a variable parameter a name, like any other parameter, such as:
Reference # define debug (format, args ...) fprintf (stderr, format, args)
This definition is
Reproduced in http://blog.csdn.net/aobai219/article/details/6092292
#if
#ifdef
#if defined
In GNU C, a macro can accept a variable number of arguments, just like a function, such as:#define PR_DEBUG (Fmt,arg ...)/PRINTK (Kern_debug fmt,#
Preprocessing commands in C #As a pair in Preprocessing: # region name, # endregion may be the most commonly used by everyone. I also use it to block code. In a long CS file, this is indeed a good way to make the code clearer. vs also uses this to
Programming nineth chapter Configuration and scheduling
In the previous chapter, you learned how to create a common language runtime (CLR) component and how to use it in a simple test application. While the CLR component is ready to load, you should
I have learned C language and C ++ for three years, but I still don't know much about Conditional compilation commands. I can see some excellent source code on the Linux platform, such as uC/OS-II used a lot of compilation instructions, MFC also
Objective:
When we write programs, we always add some statements like printf to output debugging information, but the printf statement has a very inconvenient place when we need to publish a program to delete these statements, and once you need to
[Problem description] generic is a special type that delays the work of a specified type until the client Code declares and instantiates a class or method. Generics are designed to solve function name conflicts. Generic is generally considered to be
Conditional compilation and c ++ Conditional compilation
1. ifdef
#ifdef XXXXX......#endifIf XXXXX is defined, compile the above Code.
2. ifndef
#ifndef XXXXX......#endifIf XXXXX is not defined, compile the above Code.
3. if
#if
The VC project must be consistent with the linked static library (*. Lib) file:For example:
Does the Shared Mode use mfc dll or the static mode use mfc dll?Is it multithreading or a single thread? Is debug mode or release mode? Project property
Preface:
When writing a program, we always add some printf and other statements to output debugging information, however, the most inconvenient part of the printf statement is that when we need to release a program, we need to delete these
Original address: http://blog.csdn.net/cp1300/article/details/7773239 when we write a program, we always add more or less statements such as printf to output debug information. But the printf statement has a very inconvenient place is when we need
In general, all rows in the source program participate in the compilation. But sometimes it is desirable to compile a portion of the content only under certain conditions, that is, to specify a compilation condition for a portion of the content,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.