Click here to Skip to main content
16,011,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralGame Interface Pin
philadelphia7-Jan-05 21:36
philadelphia7-Jan-05 21:36 
GeneralRe: Game Interface Pin
User 66588-Jan-05 1:47
User 66588-Jan-05 1:47 
GeneralRe: Game Interface Pin
BlackDice8-Jan-05 2:30
BlackDice8-Jan-05 2:30 
GeneralRe: Game Interface Pin
Leyu8-Jan-05 19:47
Leyu8-Jan-05 19:47 
QuestionHow to get start withe GDI+ under Windows XP / Visual C++ 5.0? Pin
Shuang. Wu7-Jan-05 20:55
Shuang. Wu7-Jan-05 20:55 
AnswerRe: How to get start withe GDI+ under Windows XP / Visual C++ 5.0? Pin
Shuang. Wu7-Jan-05 20:59
Shuang. Wu7-Jan-05 20:59 
AnswerRe: How to get start withe GDI+ under Windows XP / Visual C++ 5.0? Pin
Shuang. Wu10-Jan-05 15:22
Shuang. Wu10-Jan-05 15:22 
Questionsorting 3 indexes?????? Pin
alex.barylski7-Jan-05 19:50
alex.barylski7-Jan-05 19:50 
I'm so confused it's not even funny...I swear this probl;em is unsolvable... Smile | :)

jk

Anyways...here it is...

I have three integer indexes stored in an associative array

arr["MONTH"] = 12;
arr["YEAR"] = 3;
arr["DAY"] = 0;


I need to some how sort these indexes now, but sorting is not an option...

I need to basically convert each index value into it's element index inside the array...

Do I make sense???

The numbers above would become:

arr["MONTH"] = 2;
arr["YEAR"] = 1;
arr["DAY"] = 0;


Each element may be any number, except for the same as any other...there will never be 2 10's, etc...

Here is what i've tried to use thus far, but it makes no sense...

// If max1 == max2 then YEAR > MONTH
// If max1 != max2 then YEAR < MONTH

var max1 = Math.max(this.m_arrIndex['MONTH'], this.m_arrIndex['YEAR']);

var max2 = Math.max(this.m_arrIndex['DAY'], this.m_arrIndex['YEAR']);
var max3 = Math.max(this.m_arrIndex['DAY'], this.m_arrIndex['MONTH']);


Remember sorting the array is out of the question...

Anyone care to shed some light on this subject for me...possible solve it for me Poke tongue | ;-P

It's really driving me nutts...

Thanks Smile | :)

It's frustrating being a genius and living the life of a moron!!!
AnswerRe: sorting 3 indexes?????? Pin
alex.barylski7-Jan-05 21:11
alex.barylski7-Jan-05 21:11 
GeneralSCSI Hard Disk Number Pin
shonty7-Jan-05 19:20
shonty7-Jan-05 19:20 
GeneralRe: SCSI Hard Disk Number Pin
guolw.wloug13-Oct-11 0:01
guolw.wloug13-Oct-11 0:01 
GeneralSNMP implementation Pin
dipeka7-Jan-05 18:26
dipeka7-Jan-05 18:26 
QuestionWhat can specify the order shown after &quot;dir&quot; Pin
LiYS7-Jan-05 17:32
LiYS7-Jan-05 17:32 
AnswerRe: What can specify the order shown after &quot;dir&quot; Pin
Maximilien8-Jan-05 2:24
Maximilien8-Jan-05 2:24 
QuestionIs the codes here nothing with License problem? Pin
max_xiayi7-Jan-05 15:32
max_xiayi7-Jan-05 15:32 
AnswerRe: Is the codes here nothing with License problem? Pin
Michael Dunn8-Jan-05 6:01
sitebuilderMichael Dunn8-Jan-05 6:01 
Generalaudio effect Pin
yogui417-Jan-05 15:05
yogui417-Jan-05 15:05 
GeneralRe: audio effect Pin
Marcus Spitzmiller8-Jan-05 2:19
Marcus Spitzmiller8-Jan-05 2:19 
GeneralRe: audio effect Pin
yogui418-Jan-05 6:34
yogui418-Jan-05 6:34 
GeneralRe: audio effect Pin
Marcus Spitzmiller9-Jan-05 2:23
Marcus Spitzmiller9-Jan-05 2:23 
GeneralRe: audio effect Pin
Ravi Bhavnani8-Jan-05 7:41
professionalRavi Bhavnani8-Jan-05 7:41 
Generalchar interpretation Pin
Petr Pivonka7-Jan-05 14:17
sussPetr Pivonka7-Jan-05 14:17 
GeneralRe: char interpretation Pin
User 66588-Jan-05 2:31
User 66588-Jan-05 2:31 
GeneralCurious about the file sort order Pin
LiYS7-Jan-05 13:39
LiYS7-Jan-05 13:39 
GeneralRe: Curious about the file sort order Pin
Maximilien7-Jan-05 14:09
Maximilien7-Jan-05 14:09 

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.