debug-控制台输出

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifdef _DEBUG
#include "conio.h"
#endif

#ifdef _DEBUG
AllocConsole();
_cprintf("Debuging....\r\n");
#endif

_cwprintf(L"Debuging....\r\n");

int i = -16,
h = 29;
unsigned u = 62511;
char c = 'A';
char s[] = "Test";

// Note that console output does not translate \n as
// standard output does. Use \r\n instead.
//
_cprintf( "%d %.4x %u %c %s\r\n", i, h, u, c, s );

#ifdef _DEBUG
// 退出时释放
FreeConsole();
#endif
坚持原创技术分享,您的支持将鼓励我继续创作!