討論串[問題] C++用marco debug的寫法
共 4 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者loveme00835 (朴髮箍)時間14年前 (2011/04/07 03:02), 編輯資訊
0
0
2
內容預覽:
std::endl 的宣告長成這樣, 它是一個 function template:. template <class charT, class traits>. basic_ostream<charT,traits>& endl(basic_ostream<charT,traits>& os);.
(還有1108個字)

推噓2(2推 0噓 4→)留言6則,0人參與, 最新作者AntaresStar時間14年前 (2011/04/06 23:41), 編輯資訊
0
0
0
內容預覽:
有點離題 只是有點好奇. Null & operator <<( std::ostream & (*)( std::ostream & ) ). 這個為什麼不能寫成. template <typename T> Null & operator <<( T & (*)( T & ) ). 如果改這樣就

推噓1(1推 0噓 2→)留言3則,0人參與, 最新作者legnaleurc (CA)時間14年前 (2011/04/05 23:53), 編輯資訊
0
0
0
內容預覽:
搞一個空的輸出就好了吧 .... class Null {. public:. // 為了 std::endl. Null & operator <<( std::ostream & (*)( std::ostream & ) ) {. return *this;. }. // 其他的都來這裡. t
(還有275個字)

推噓3(3推 0噓 23→)留言26則,0人參與, 最新作者sudada (嘰咕嘰咕嘰咕)時間14年前 (2011/04/05 20:53), 編輯資訊
0
0
0
內容預覽:
開發平台(Platform): (Ex: VC++, GCC, Linux, ...). GCC. 問題(Question):. 之前寫C的時候我會用marco來寫一些debug的訊息. 大概像這樣子. #ifdef DEBUG. #define _DEBUG(str,args...) fprint
(還有286個字)
首頁
上一頁
1
下一頁
尾頁