DEV-C ++ 5.11调试STL迭代器的问题

时间:2016-04-02 03:05:18

标签: c++ debugging stl dev-c++

我在Windows 10上使用DEV-C ++ 5.11。我发现调试器对STL容器的支持似乎不太好,或者我可能缺少一些东西。我有以下代码: xxx.h

<html>
<head>
<link rel="stylesheet" type="text/css" href="http://tablesorter.com/themes/blue/style.css">
<link rel="stylesheet" type="text/css" href="http://tablesorter.com/docs/css/jq.css">
<script type="text/javascript" src="http://tablesorter.com/__jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>

$(document).ready(function() {
    $.ajax({
        type: "GET",
        url: "MovieList.csv",
        dataType: "text",
        success: function(data) {processData(data);}
     });

});

function processData(allText) {
    var allTextLines = allText.split(/\r\n|\n/);
    var headers = allTextLines[0].split(",");
    var lines = [];
var thelist
var columns = [];
//thelist = "<thead><tr>"
//for (i in headers) {
//headers[i] = headers[i].replace(/"/g,"")
//thelist += "<th>"+headers[i]+"</th>"
//}
//thelist += "</tr></thead><tbody>"
for (i in allTextLines) {
thelist +="<tr>"
columns = allTextLines[i].split(",")
if (i > 0) {
for (i in columns) {
columns[i] = columns[i].replace(/"/g,"")
thelist += "<td>"
thelist += columns[i]
thelist += "</td>"
} }
thelist += "</tr>"
} 
//thelist += "</tbody>"


$("#test").append(thelist);

};   

$(document).ready(function() {
$("#myTable").tablesorter();
});

xxx.cpp

typedef std::vector<double> vd;
typedef vd::const_iterator it_vd;

首先,我发现使用手表无法看到vec的内容。其次,如果我将断点放在for循环的行中,一旦调试器进入那里,它就无法离开,无论我使用下一行/下一条指令还是继续。我错过了什么吗?

1 个答案:

答案 0 :(得分:0)

使用“ \ n”(换行)代替endl。