Click here to Skip to main content
15,907,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
General#pragma pack(1) packing wrong structure sizes ! ! ! Pin
Alan Chambers21-Jan-05 14:58
Alan Chambers21-Jan-05 14:58 
GeneralRe: #pragma pack(1) packing wrong structure sizes ! ! ! Pin
Tim Smith21-Jan-05 15:10
Tim Smith21-Jan-05 15:10 
GeneralRe: #pragma pack(1) packing wrong structure sizes ! ! ! Pin
Alan Chambers21-Jan-05 23:59
Alan Chambers21-Jan-05 23:59 
GeneralRe: #pragma pack(1) packing wrong structure sizes ! ! ! Pin
Alan Chambers28-Jan-05 11:05
Alan Chambers28-Jan-05 11:05 
QuestionHow to use shared-memory to map uncertain page file Pin
shusong21-Jan-05 14:06
shusong21-Jan-05 14:06 
AnswerRe: How to use shared-memory to map uncertain page file Pin
Bob Ciora21-Jan-05 19:47
Bob Ciora21-Jan-05 19:47 
QuestionHow to draw a ListView frame Pin
Björn Eiríksson21-Jan-05 13:25
sussBjörn Eiríksson21-Jan-05 13:25 
QuestionHow to perform qsort on a CList of class objects? Pin
wsquare21-Jan-05 12:51
wsquare21-Jan-05 12:51 
Hi folks,

Need some serious help here. May i know how i can perform a qsort on a list of class objects I created using CList ?

I've been refering to Dr. Newcomer article on Sorting for assistance..but guess i'm pretty amateur to really understand the full concept.

Suppose I create a linked list of data type matchData called ResultList...

class matchData {
public:
matchData(CString ="", double = 0, double =0, double =0, int=0); //constructor

//set functions
void setMatchData(CString, double,double,double,int);
CString getModelName();
double getNum1();
double getNum2();
~matchData(); //destructor
private:
CString modelName;
double num1;
double num2;
int x;
};

typedef CList<matchdata*,matchdata*> matchList;

matchList Result;


how can i proceed on to qsort my Result list (assuming the list is not empty) based on num1 followed by num2? Do I have to create another class say Finalresult and put in a private data matchList inside the class ?

Please help...

Thanks alot!
AnswerRe: How to perform qsort on a CList of class objects? Pin
wsquare21-Jan-05 12:56
wsquare21-Jan-05 12:56 
AnswerRe: How to perform qsort on a CList of class objects? Pin
Anonymous21-Jan-05 13:31
Anonymous21-Jan-05 13:31 
AnswerRe: How to perform qsort on a CList of class objects? Pin
Bob Ciora21-Jan-05 18:48
Bob Ciora21-Jan-05 18:48 
GeneralRe: How to perform qsort on a CList of class objects? Pin
wsquare21-Jan-05 19:58
wsquare21-Jan-05 19:58 
GeneralRe: How to perform qsort on a CList of class objects? Pin
markkuk22-Jan-05 0:03
markkuk22-Jan-05 0:03 
GeneralRe: How to perform qsort on a CList of class objects? Pin
Bob Ciora22-Jan-05 3:25
Bob Ciora22-Jan-05 3:25 
GeneralRe: How to perform qsort on a CList of class objects? Pin
markkuk23-Jan-05 4:31
markkuk23-Jan-05 4:31 
GeneralRe: How to perform qsort on a CList of class objects? Pin
Bob Ciora22-Jan-05 4:22
Bob Ciora22-Jan-05 4:22 
QuestionHow do I assign char array address to int? Pin
ErikDabrowsky21-Jan-05 10:26
ErikDabrowsky21-Jan-05 10:26 
AnswerRe: How do I assign char array address to int? Pin
Michael Dunn21-Jan-05 11:00
sitebuilderMichael Dunn21-Jan-05 11:00 
GeneralRe: How do I assign char array address to int? Pin
ErikDabrowsky21-Jan-05 11:29
ErikDabrowsky21-Jan-05 11:29 
AnswerRe: How do I assign char array address to int? Pin
markkuk22-Jan-05 0:19
markkuk22-Jan-05 0:19 
GeneralMFC app. + Ms-Dos commands Pin
holy shit21-Jan-05 9:12
holy shit21-Jan-05 9:12 
GeneralRe: MFC app. + Ms-Dos commands Pin
Chris Losinger21-Jan-05 9:19
professionalChris Losinger21-Jan-05 9:19 
GeneralRe: MFC app. + Ms-Dos commands Pin
holy shit21-Jan-05 9:28
holy shit21-Jan-05 9:28 
GeneralRe: MFC app. + Ms-Dos commands Pin
Shog921-Jan-05 9:32
sitebuilderShog921-Jan-05 9:32 
GeneralRe: MFC app. + Ms-Dos commands Pin
Chris Losinger21-Jan-05 9:34
professionalChris Losinger21-Jan-05 9:34 

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.