本文介紹了在 Visual Studio 調試中檢查 STL 容器的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
如果我有一個 std::vector
或 std::map
變量,并且我想查看內容,那么看到第 n 個元素會很痛苦調試.有沒有插件,或者在調試(VS2003/2005/2008)
時更容易觀察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)
?
推薦答案
對于向量,這個 thread 有一個代碼片段,用于在矢量索引上設置監(jiān)視可能會有所幫助.
For vectors, this thread on the msdn forums has a code snippet for setting a watch on a vector index that might help.
這篇關于在 Visual Studio 調試中檢查 STL 容器的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!