Hi ! I have a problem with debug in c++. I'm using this —
void DBG() { cerr << "]" << endl; } template<class H, class... T> void DBG(H h, T... t) { cerr << to_string(h); if(sizeof...(t)) cerr << ", "; DBG(t...); }
ifdef _DEBUG
define dbg(...) cerr << "LINE(" << LINE << ") -> [" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)
else
define dbg(...) 0
endif
When i type for example — int a = 5; dbg(a);
It's not showing any output.