Getting last element from vector

link_Node *pNode,*tempsegnode;; // here link_node is a class
vector<link_Node*> *pList;

pNode = (*pList)[i];

i want to find that a pNode is last in pList and if so i have to take some corrective measure.
i tried using end() API but not able to make it working

can someone help how to find last element from pList and then compare pNode and last element.
std::vector::back()
Last edited on
Topic archived. No new replies allowed.