Skip to content

Program do not show all results #461

Answered by Pitido
Pitido asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

this problem is solved now by using the same nodes for the loops.

`for (pugi::xml_node trk = doc.child("gpx").child("trk"); trk;trk = trk.next_sibling("trk")) {

    trck_name = trk.child("name").child_value();
    cout << "trk_name: " << trck_name << endl;

    for (pugi::xml_node trkpt = trk.child("trkseg").child("trkpt"); trkpt; trkpt = trkpt.next_sibling("trkpt")){

        std::cout << "Trkpt " << trkpt.attribute("lat").value() << endl;
    }

 }`

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Pitido
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant