Click here to Skip to main content
15,891,372 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Storage Allocation Pin
jschell5-Dec-17 11:51
jschell5-Dec-17 11:51 
GeneralRe: Storage Allocation Pin
ForNow5-Dec-17 12:52
ForNow5-Dec-17 12:52 
GeneralRe: Storage Allocation Pin
jschell8-Dec-17 6:58
jschell8-Dec-17 6:58 
GeneralRe: Storage Allocation Pin
ForNow8-Dec-17 8:08
ForNow8-Dec-17 8:08 
GeneralRe: Storage Allocation Pin
jschell8-Dec-17 13:07
jschell8-Dec-17 13:07 
QuestionException in CListBox::Addstring Pin
ForNow1-Dec-17 2:07
ForNow1-Dec-17 2:07 
AnswerRe: Exception in CListBox::Addstring Pin
Jochen Arndt1-Dec-17 2:47
professionalJochen Arndt1-Dec-17 2:47 
GeneralRe: Exception in CListBox::Addstring Pin
ForNow1-Dec-17 2:58
ForNow1-Dec-17 2:58 
GeneralRe: Exception in CListBox::Addstring Pin
Jochen Arndt1-Dec-17 4:18
professionalJochen Arndt1-Dec-17 4:18 
GeneralRe: Exception in CListBox::Addstring Pin
ForNow1-Dec-17 5:04
ForNow1-Dec-17 5:04 
GeneralRe: Exception in CListBox::Addstring Pin
Victor Nijegorodov1-Dec-17 9:34
Victor Nijegorodov1-Dec-17 9:34 
AnswerRe: Exception in CListBox::Addstring Pin
Richard MacCutchan1-Dec-17 2:47
mveRichard MacCutchan1-Dec-17 2:47 
GeneralRe: Exception in CListBox::Addstring Pin
ForNow1-Dec-17 2:53
ForNow1-Dec-17 2:53 
GeneralRe: Exception in CListBox::Addstring Pin
Richard MacCutchan1-Dec-17 3:09
mveRichard MacCutchan1-Dec-17 3:09 
GeneralRe: Exception in CListBox::Addstring Pin
ForNow1-Dec-17 3:13
ForNow1-Dec-17 3:13 
QuestionMatrix not getting initialized Pin
User 1350945030-Nov-17 8:38
professionalUser 1350945030-Nov-17 8:38 
AnswerRe: Matrix not getting initialized Pin
CPallini30-Nov-17 10:37
mveCPallini30-Nov-17 10:37 
GeneralRe: Matrix not getting initialized Pin
User 1350945030-Nov-17 22:00
professionalUser 1350945030-Nov-17 22:00 
GeneralRe: Matrix not getting initialized Pin
CPallini30-Nov-17 22:17
mveCPallini30-Nov-17 22:17 
QuestionHow to find the index of smallest 3 elements in an array Pin
User 1350945030-Nov-17 2:06
professionalUser 1350945030-Nov-17 2:06 
AnswerRe: How to find the index of smallest 3 elements in an array Pin
Jochen Arndt30-Nov-17 2:24
professionalJochen Arndt30-Nov-17 2:24 
GeneralRe: How to find the index of smallest 3 elements in an array Pin
User 1350945030-Nov-17 2:32
professionalUser 1350945030-Nov-17 2:32 
GeneralRe: How to find the index of smallest 3 elements in an array Pin
Jochen Arndt30-Nov-17 2:54
professionalJochen Arndt30-Nov-17 2:54 
See the link from my answer. It contains example code showing that it must be passed as 3rd template parameter. So you have to pass also the 2nd parameter.

As with any templates, T (uppercase) is a placeholder for the corresponding type which is std::pair<double, int> in your case.

So it must be (untested):
C++
priority_queue < pair<double, int>, vector<pair<double, int>>, greater<pair<double, int>> > pQueue;

GeneralRe: How to find the index of smallest 3 elements in an array Pin
User 1350945030-Nov-17 4:56
professionalUser 1350945030-Nov-17 4:56 
QuestionPrecision in C Pin
Anonygeeker29-Nov-17 18:13
Anonygeeker29-Nov-17 18:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.