mirror of
https://github.com/Hizenberg469/Algorithms-snippets.git
synced 2026-04-19 22:52:23 +03:00
update
This commit is contained in:
18
playground/include/debug.h
Normal file
18
playground/include/debug.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef __DEBUG__
|
||||
#define __DEBUG__
|
||||
|
||||
/*
|
||||
* var_name: to display variable name used
|
||||
* var_value: to display variable value with variable name.
|
||||
*/
|
||||
|
||||
#define var_name(arg) #arg
|
||||
|
||||
|
||||
#ifdef NPRINT_VAR
|
||||
#define var_value(arg) ((void)0)
|
||||
#else
|
||||
#define var_value(arg) cout << var_name(arg) << ": " << arg << endl;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user