Click here to Skip to main content
15,921,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWM_CLOSE Message ? Pin
Sakthiu9-Nov-06 21:29
Sakthiu9-Nov-06 21:29 
AnswerRe: WM_CLOSE Message ? Pin
Mike_9999-Nov-06 21:31
Mike_9999-Nov-06 21:31 
AnswerRe: WM_CLOSE Message ? Pin
prasad_som9-Nov-06 21:39
prasad_som9-Nov-06 21:39 
AnswerRe: WM_CLOSE Message ? Pin
dharani9-Nov-06 21:42
dharani9-Nov-06 21:42 
AnswerRe: WM_CLOSE Message ? Pin
Hamid_RT10-Nov-06 1:31
Hamid_RT10-Nov-06 1:31 
QuestionHow to detect the socket was blocked? Pin
LaHaHa9-Nov-06 20:56
LaHaHa9-Nov-06 20:56 
AnswerRe: How to detect the socket was blocked? Pin
Moak18-Dec-06 5:42
Moak18-Dec-06 5:42 
QuestionFinding number of occurences in a list of numbers Pin
Jay039-Nov-06 19:57
Jay039-Nov-06 19:57 
hey guys,
I was wondering what the most efficient way of finding the number of occurences in a list is.

Say I have a list....

struct data{
int number;
int occurences;
};

data list[7];

list[0].number = 5;
list[1].number = 6;
list[2].number = 6;
list[3].number = 8;
list[4].number = 9;
list[5].number = 9;
list[6].number = 9;

how would i sort in such a way that I eliminate the numbers that occur more than once like this,

list[0].number = 5;
list[1].number = 6;
list[2].number = 8;
list[3].number = 9;

and saves the number of occurence for each number

list[0].occurences = 1;
list[1].occurences = 2;
list[2].occurences = 1;
list[3].occurences = 3;

I thought of every possible way,
I can do it for numbers that appear twice but three times, i duno how to deal with it.....
Someone please help me out
D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh: Confused | :confused: Confused | :confused: Confused | :confused:
AnswerRe: Finding number of occurences in a list of numbers Pin
XtremDev9-Nov-06 20:28
XtremDev9-Nov-06 20:28 
GeneralRe: Finding number of occurences in a list of numbers Pin
Anthony Mushrow9-Nov-06 23:41
professionalAnthony Mushrow9-Nov-06 23:41 
GeneralRe: Finding number of occurences in a list of numbers Pin
jhwurmbach10-Nov-06 2:29
jhwurmbach10-Nov-06 2:29 
AnswerRe: Finding number of occurences in a list of numbers Pin
Michael Dunn9-Nov-06 22:56
sitebuilderMichael Dunn9-Nov-06 22:56 
AnswerRe: Finding number of occurences in a list of numbers [modified] Pin
Anthony Mushrow9-Nov-06 23:38
professionalAnthony Mushrow9-Nov-06 23:38 
GeneralRe: Finding number of occurences in a list of numbers Pin
Jay0310-Nov-06 8:05
Jay0310-Nov-06 8:05 
GeneralRe: Finding number of occurences in a list of numbers Pin
Anthony Mushrow10-Nov-06 15:33
professionalAnthony Mushrow10-Nov-06 15:33 
Questionloading bitmap to dialog Pin
Sunshine Always9-Nov-06 19:51
Sunshine Always9-Nov-06 19:51 
AnswerRe: loading bitmap to dialog Pin
Christian Graus9-Nov-06 20:00
protectorChristian Graus9-Nov-06 20:00 
GeneralRe: loading bitmap to dialog Pin
Sunshine Always9-Nov-06 20:09
Sunshine Always9-Nov-06 20:09 
GeneralRe: loading bitmap to dialog Pin
Monty29-Nov-06 20:33
Monty29-Nov-06 20:33 
GeneralRe: loading bitmap to dialog Pin
Sunshine Always9-Nov-06 21:19
Sunshine Always9-Nov-06 21:19 
GeneralRe: loading bitmap to dialog Pin
Monty29-Nov-06 21:25
Monty29-Nov-06 21:25 
GeneralRe: loading bitmap to dialog Pin
Sunshine Always9-Nov-06 21:58
Sunshine Always9-Nov-06 21:58 
GeneralRe: loading bitmap to dialog Pin
Sunshine Always9-Nov-06 23:04
Sunshine Always9-Nov-06 23:04 
AnswerRe: loading bitmap to dialog Pin
Hamid_RT9-Nov-06 20:00
Hamid_RT9-Nov-06 20:00 
GeneralRe: loading bitmap to dialog Pin
Sunshine Always9-Nov-06 20:11
Sunshine Always9-Nov-06 20:11 

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.