本文介紹了在 Visual Studio 調(diào)試中檢查 STL 容器的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
限時(shí)送ChatGPT賬號(hào)..
如果我有一個(gè) std::vector
或 std::map
變量,并且我想查看內(nèi)容,那么看到第 n 個(gè)元素會(huì)很痛苦調(diào)試.有沒(méi)有插件,或者在調(diào)試(VS2003/2005/2008)
時(shí)更容易觀察STL容器變量的一些技巧?
If I have a std::vector
or std::map
variable, and I want to see the contents, it's a big pain to see the nth element while debugging. Is there a plugin, or some trick to making it easier to watch STL container variables while debugging (VS2003/2005/2008)
?
推薦答案
對(duì)于向量,這個(gè) thread 有一個(gè)代碼片段,用于在矢量索引上設(shè)置監(jiān)視可能會(huì)有所幫助.
For vectors, this thread on the msdn forums has a code snippet for setting a watch on a vector index that might help.
這篇關(guān)于在 Visual Studio 調(diào)試中檢查 STL 容器的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!