Click here to Skip to main content
15,889,116 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Compiling a single dll from several .lib Pin
Themis27-Mar-07 7:10
Themis27-Mar-07 7:10 
QuestionHow to detect change in desktop Pin
MachineMHK27-Mar-07 4:28
MachineMHK27-Mar-07 4:28 
QuestionRe: How to detect change in desktop Pin
Programm3r27-Mar-07 5:02
Programm3r27-Mar-07 5:02 
AnswerRe: How to detect change in desktop Pin
David Crow27-Mar-07 5:54
David Crow27-Mar-07 5:54 
Questionhow to get difference between two dates using CDateTimeCtrl ? Pin
jalsa G27-Mar-07 4:13
jalsa G27-Mar-07 4:13 
AnswerRe: how to get difference between two dates using CDateTimeCtrl ? Pin
Iain Clarke, Warrior Programmer27-Mar-07 4:48
Iain Clarke, Warrior Programmer27-Mar-07 4:48 
AnswerRe: how to get difference between two dates using CDateTimeCtrl ? Pin
David Crow27-Mar-07 5:56
David Crow27-Mar-07 5:56 
QuestionSorting a vector of non-primitive data types (structs) Pin
all_in_flames27-Mar-07 3:08
professionalall_in_flames27-Mar-07 3:08 
Hi everyone,
I'm attempting to write a program that takes command line arguments, reads data in from a file,
and then appropriately searches for certain data or sorts the data for output based on the argument passed.

I am having trouble figuring out how to actually sort the vectors according to the attributes.
the struct is as follows:
<br />
struct Wizard<br />
{<br />
string FirstName;<br />
string LastName;<br />
int Grade;<br />
double WandWeight;<br />
};<br />


The datafile being read from simply has each property separated by a single whitespace character. The vector is declared simply as:
<br />
vector(Wizard) wizVec;<br />

(NOTE: angle braces would not show up in preview, assume they take the place of the round braces in the vector declaration)

Don't ask about the name of the struct, it's my prof's example!
Any suggestions or solutions are appreciated and needed!
Thanks in advance!
AnswerRe: Sorting a vector of non-primitive data types (structs) Pin
Christian Graus27-Mar-07 3:12
protectorChristian Graus27-Mar-07 3:12 
AnswerRe: Sorting a vector of non-primitive data types (structs) Pin
Stephen Hewitt27-Mar-07 4:05
Stephen Hewitt27-Mar-07 4:05 
GeneralRe: Sorting a vector of non-primitive data types (structs) Pin
all_in_flames27-Mar-07 5:16
professionalall_in_flames27-Mar-07 5:16 
GeneralRe: Sorting a vector of non-primitive data types (structs) Pin
Christian Graus27-Mar-07 6:02
protectorChristian Graus27-Mar-07 6:02 
GeneralRe: Sorting a vector of non-primitive data types (structs) Pin
Stephen Hewitt27-Mar-07 13:33
Stephen Hewitt27-Mar-07 13:33 
GeneralRe: Sorting a vector of non-primitive data types (structs) Pin
Stephen Hewitt27-Mar-07 13:33
Stephen Hewitt27-Mar-07 13:33 
QuestionRe: Sorting a vector of non-primitive data types (structs) Pin
all_in_flames27-Mar-07 12:12
professionalall_in_flames27-Mar-07 12:12 
AnswerRe: Sorting a vector of non-primitive data types (structs) Pin
Stephen Hewitt27-Mar-07 13:47
Stephen Hewitt27-Mar-07 13:47 
GeneralRe: Sorting a vector of non-primitive data types (structs) Pin
all_in_flames27-Mar-07 13:54
professionalall_in_flames27-Mar-07 13:54 
GeneralRe: Sorting a vector of non-primitive data types (structs) Pin
Stephen Hewitt27-Mar-07 13:57
Stephen Hewitt27-Mar-07 13:57 
AnswerRe: Sorting a vector of non-primitive data types (structs) Pin
Michael Dunn27-Mar-07 20:36
sitebuilderMichael Dunn27-Mar-07 20:36 
GeneralRe: Sorting a vector of non-primitive data types (structs) Pin
all_in_flames28-Mar-07 2:16
professionalall_in_flames28-Mar-07 2:16 
Questionlparam and wparam Pin
Try27-Mar-07 2:59
Try27-Mar-07 2:59 
AnswerRe: lparam and wparam Pin
David Crow27-Mar-07 3:03
David Crow27-Mar-07 3:03 
QuestionRe: lparam and wparam Pin
Try27-Mar-07 3:12
Try27-Mar-07 3:12 
AnswerRe: lparam and wparam Pin
David Crow27-Mar-07 3:18
David Crow27-Mar-07 3:18 
GeneralRe: lparam and wparam Pin
Michael Dunn27-Mar-07 20:40
sitebuilderMichael Dunn27-Mar-07 20:40 

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.