Click here to Skip to main content
15,922,584 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Enumerating Network Servers Pin
Carlos Antollini16-Jan-02 3:08
Carlos Antollini16-Jan-02 3:08 
GeneralCDialog printer resolution Pin
Jonnie White16-Jan-02 2:35
Jonnie White16-Jan-02 2:35 
GeneralRe: CDialog printer resolution Pin
567890123416-Jan-02 4:23
567890123416-Jan-02 4:23 
GeneralRe: CDialog printer resolution Pin
Jonnie White16-Jan-02 4:52
Jonnie White16-Jan-02 4:52 
Generalqsort and CArray Pin
Gavin Jerman16-Jan-02 2:28
Gavin Jerman16-Jan-02 2:28 
GeneralRe: qsort and CArray Pin
Giles16-Jan-02 3:11
Giles16-Jan-02 3:11 
GeneralRe: qsort and CArray Pin
Joaquín M López Muñoz16-Jan-02 3:44
Joaquín M López Muñoz16-Jan-02 3:44 
GeneralRe: qsort and CArray Pin
Gavin Jerman16-Jan-02 4:35
Gavin Jerman16-Jan-02 4:35 
Thanks for your reply - the qsort now works a treat!

I've had a go at using the STL sort and vector:

// declare vector
vector<cfunddata*> vFD;
vector<cfunddata*>::iterator it;

// populate vector
...

// sort the vector
sort(vFD.begin(), vFD.end(), compareFundName);

// comparision function
bool compareFundName(const CFundData* lhs, const CFundData* rhs)
{
return lhs->m_sFundName < rhs->m_sFundName;
}

This works, and is definately neater than the qsort approach. Is this the best STL way? You mentioned using STL sort with CFundDataPtrArray, but I'm not sure how to do this.

Gavin
GeneralRe: qsort and CArray Pin
Joaquín M López Muñoz16-Jan-02 6:08
Joaquín M López Muñoz16-Jan-02 6:08 
GeneralRe: qsort and CArray Pin
Gavin Jerman16-Jan-02 21:22
Gavin Jerman16-Jan-02 21:22 
QuestionWhere is classwizard in Visual C++.NET ? Pin
16-Jan-02 2:21
suss16-Jan-02 2:21 
AnswerRe: Where is classwizard in Visual C++.NET ? Pin
Fazlul Kabir16-Jan-02 2:34
Fazlul Kabir16-Jan-02 2:34 
GeneralRe: Where is classwizard in Visual C++.NET ? Pin
Wizard_0116-Jan-02 2:46
Wizard_0116-Jan-02 2:46 
GeneralRe: Where is classwizard in Visual C++.NET ? Pin
Fazlul Kabir16-Jan-02 3:07
Fazlul Kabir16-Jan-02 3:07 
AnswerRe: Where is classwizard in Visual C++.NET ? Pin
Carlos Antollini16-Jan-02 2:54
Carlos Antollini16-Jan-02 2:54 
GeneralRe: Where is classwizard in Visual C++.NET ? Pin
Wizard_0116-Jan-02 3:00
Wizard_0116-Jan-02 3:00 
GeneralSysmenu Pin
Rickard Andersson2016-Jan-02 2:05
Rickard Andersson2016-Jan-02 2:05 
QuestionHow to send files through winsock Pin
Kuniva16-Jan-02 1:26
Kuniva16-Jan-02 1:26 
AnswerRe: How to send files through winsock Pin
Joao Vaz16-Jan-02 4:04
Joao Vaz16-Jan-02 4:04 
GeneralURGENT Help Required Pin
James Spibey16-Jan-02 1:19
James Spibey16-Jan-02 1:19 
GeneralRe: URGENT Help Required Pin
Phil.Benson16-Jan-02 1:31
professionalPhil.Benson16-Jan-02 1:31 
GeneralRe: URGENT Help Required Pin
James Spibey16-Jan-02 1:36
James Spibey16-Jan-02 1:36 
GeneralRe: URGENT Help Required Pin
Matt Gullett16-Jan-02 2:05
Matt Gullett16-Jan-02 2:05 
GeneralRe: URGENT Help Required Pin
James Spibey16-Jan-02 2:54
James Spibey16-Jan-02 2:54 
GeneralFIXED WOO-HOO Pin
James Spibey16-Jan-02 3:03
James Spibey16-Jan-02 3:03 

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.