Click here to Skip to main content
15,927,744 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Disable time change? Pin
30-Sep-01 4:21
suss30-Sep-01 4:21 
GeneralRe: Disable time change? Pin
30-Sep-01 5:11
suss30-Sep-01 5:11 
AnswerRe: Disable time change? Pin
Ravi Bhavnani30-Sep-01 4:55
professionalRavi Bhavnani30-Sep-01 4:55 
GeneralRe: Disable time change? Pin
30-Sep-01 5:07
suss30-Sep-01 5:07 
GeneralRe: Disable time change? Pin
Ravi Bhavnani30-Sep-01 5:15
professionalRavi Bhavnani30-Sep-01 5:15 
GeneralMode Function Pin
EvilSource29-Sep-01 9:02
EvilSource29-Sep-01 9:02 
GeneralRe: Mode Function Pin
Paolo Messina30-Sep-01 4:06
professionalPaolo Messina30-Sep-01 4:06 
GeneralMath function Pin
29-Sep-01 8:38
suss29-Sep-01 8:38 
The function has to find the mode (number most found in the array, for ex. array[]{1, 2, 1, 1} the mode is 1 since it appears 3 times in the array while 2 only apears once.

movie is a class and it has a array of ints which movie.return_value(int) accesses. right now the mode equals the first number in the array, its like the second if isant getting evaluated right, anyway in my mind this should work and i cant find a way around it.

void getmode(movie_data movie){

int numfound0=0, numfound1=0, mode=0,
*num0ptr=&numfound0, *num1ptr=&numfound1, *modeptr=&mode;




for(int j=0;j<movie.return_count();j++){
*num0ptr="0;
" for(int="" k="0;k<movie.return_count();k++){
" if(movie.return_value(j)="=movie.return_value(k))
" if(*num0ptr="">*num1ptr){
num1ptr=num0ptr;
*modeptr=movie.return_value(j);
}
}
}

cout<<*num1ptr;
movie.put_mode(modeptr);
cout<
GeneralRe: Math function Pin
Paolo Messina30-Sep-01 4:04
professionalPaolo Messina30-Sep-01 4:04 
GeneralDWebBrowserEvents2 Pin
29-Sep-01 4:33
suss29-Sep-01 4:33 
GeneralChanging windows cursors programatically Pin
Erik Hammar29-Sep-01 3:27
Erik Hammar29-Sep-01 3:27 
GeneralRe: Changing windows cursors programatically Pin
29-Sep-01 4:02
suss29-Sep-01 4:02 
GeneralCFormView window Border Pin
Giles29-Sep-01 0:45
Giles29-Sep-01 0:45 
GeneralRe: CFormView window Border Pin
Paolo Messina29-Sep-01 2:37
professionalPaolo Messina29-Sep-01 2:37 
GeneralRe: CFormView window Border Pin
Giles29-Sep-01 2:59
Giles29-Sep-01 2:59 
GeneralRe: CFormView window Border Pin
Paolo Messina29-Sep-01 3:05
professionalPaolo Messina29-Sep-01 3:05 
GeneralRe: CFormView window Border Pin
Giles29-Sep-01 3:13
Giles29-Sep-01 3:13 
GeneralRe: CFormView window Border Pin
Paolo Messina29-Sep-01 3:58
professionalPaolo Messina29-Sep-01 3:58 
GeneralRe: CFormView window Border Pin
Giles29-Sep-01 4:38
Giles29-Sep-01 4:38 
GeneralRe: CFormView window Border Pin
Paolo Messina29-Sep-01 4:46
professionalPaolo Messina29-Sep-01 4:46 
GeneralRe: correction Pin
Paolo Messina29-Sep-01 4:54
professionalPaolo Messina29-Sep-01 4:54 
GeneralRe: correction Pin
Giles29-Sep-01 5:08
Giles29-Sep-01 5:08 
GeneralRe: not really Pin
Paolo Messina29-Sep-01 5:39
professionalPaolo Messina29-Sep-01 5:39 
GeneralRe: not really Pin
Nish Nishant6-Mar-02 9:11
sitebuilderNish Nishant6-Mar-02 9:11 
GeneralRe: not really Pin
Paolo Messina6-Mar-02 9:36
professionalPaolo Messina6-Mar-02 9:36 

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.