Debuging not working

Правка en1, от Bryma, 2020-12-14 17:44:35

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.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Bryma 2020-12-14 17:44:35 510 Initial revision (published)