I have list< pair<double,double> >::iterator p;
how can I print value of pairs???
for (p=k.begin(); p!=k.end(); ++p)
cout << " " << *p.first;
is not working!!!
I have list< pair<double,double> >::iterator p;
how can I print value of pairs???
for (p=k.begin(); p!=k.end(); ++p)
cout << " " << *p.first;
is not working!!!
»
Jokser
|
12 years ago,
#
|
+7
cout << " " << p->first;
→
Reply
|