Click here to Skip to main content
15,897,891 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSame Resource IDs in resource.h Pin
Anu_Bala15-Feb-11 20:07
Anu_Bala15-Feb-11 20:07 
AnswerRe: Same Resource IDs in resource.h Pin
Hans Dietrich15-Feb-11 21:10
mentorHans Dietrich15-Feb-11 21:10 
AnswerRe: Same Resource IDs in resource.h Pin
ThatsAlok15-Feb-11 21:12
ThatsAlok15-Feb-11 21:12 
GeneralRe: Same Resource IDs in resource.h Pin
Anu_Bala15-Feb-11 21:46
Anu_Bala15-Feb-11 21:46 
AnswerRe: Same Resource IDs in resource.h Pin
chevu15-Feb-11 22:01
chevu15-Feb-11 22:01 
GeneralRe: Same Resource IDs in resource.h Pin
ThatsAlok15-Feb-11 22:52
ThatsAlok15-Feb-11 22:52 
GeneralRe: Same Resource IDs in resource.h Pin
Anu_Bala15-Feb-11 22:54
Anu_Bala15-Feb-11 22:54 
QuestionArray Issue. Pin
Mike Certini15-Feb-11 19:13
Mike Certini15-Feb-11 19:13 
I put together a program that takes a list of numbers in an array and sorts them by copying out of the first array into a second array when the value in the first array matches the maximum array element in the first array. What I cannot figure out is why when I look at the array elements saved in the final array there is a skip in element #10 to #11. In other words the second array correctly saves nine 10's and then skips element #10 and then saves the 9's starting in element #11.

#include <stdio.h>
#include <stdlib.h>
#define LIMIT 100

int roll[100];
int fin[100];
int num = 0;


int main(void)
	{
	int cyc = 0;
	int top = 0;
	int rotate = 0;
	int seek = 0;
	int loop = 0;
	int temp = 0;
		
	while(num < LIMIT)
		{
		roll[num] = rand() % 10 + 1;
		printf("%i",roll[num]);
		printf("\n");
		num++;
		}
	
	for(cyc = 0; cyc < num; cyc++)
		{
		if(roll[loop] > roll[loop+1] && roll[loop] > temp)
			{
			temp = roll[loop];
			}
		loop++;
		}
	
	for(cyc = 0; cyc < num; cyc++)
		{
		loop = 0;			        //Zero loop for second number to be evaluated
		while(loop < num)	                //Go through entire list
			{
			if(roll[loop] == temp)	        //Evaluate whether item matches maximum number
				{																			
				fin[cyc] = roll[loop];	//Copy item in the first array into the final array.
				cyc++;			//Increment cycle by 1.
				}
			loop++;				//Increment loop to pass through entire list.
			}
		temp--;					//Decrement number to be evaluated.	
		}
	}

AnswerSolution To Array Issue. Pin
Mike Certini15-Feb-11 20:07
Mike Certini15-Feb-11 20:07 
AnswerRe: Array Issue. Pin
User 742933815-Feb-11 20:07
professionalUser 742933815-Feb-11 20:07 
AnswerRe: Array Issue. Pin
Stefan_Lang16-Feb-11 0:18
Stefan_Lang16-Feb-11 0:18 
QuestionClosing childview in MDI [SOLVED] Pin
Anu_Bala15-Feb-11 18:23
Anu_Bala15-Feb-11 18:23 
AnswerRe: Closing childview in MDI Pin
tagopi15-Feb-11 18:53
tagopi15-Feb-11 18:53 
AnswerRe: Closing childview in MDI Pin
_AnsHUMAN_ 15-Feb-11 19:02
_AnsHUMAN_ 15-Feb-11 19:02 
AnswerRe: Closing childview in MDI Pin
Anu_Bala15-Feb-11 20:01
Anu_Bala15-Feb-11 20:01 
QuestionHow to bring an App to front, from another App Pin
timbk15-Feb-11 15:50
timbk15-Feb-11 15:50 
QuestionRe: How to bring an App to front, from another App Pin
David Crow15-Feb-11 16:54
David Crow15-Feb-11 16:54 
AnswerRe: How to bring an App to front, from another App Pin
Anthony Mushrow15-Feb-11 16:58
professionalAnthony Mushrow15-Feb-11 16:58 
GeneralRe: How to bring an App to front, from another App Pin
timbk16-Feb-11 0:32
timbk16-Feb-11 0:32 
GeneralRe: How to bring an App to front, from another App Pin
Anthony Mushrow16-Feb-11 3:31
professionalAnthony Mushrow16-Feb-11 3:31 
GeneralRe: How to bring an App to front, from another App Pin
timbk16-Feb-11 11:06
timbk16-Feb-11 11:06 
GeneralRe: How to bring an App to front, from another App Pin
Anthony Mushrow16-Feb-11 12:03
professionalAnthony Mushrow16-Feb-11 12:03 
GeneralRe: How to bring an App to front, from another App Pin
timbk16-Feb-11 16:54
timbk16-Feb-11 16:54 
GeneralRe: How to bring an App to front, from another App Pin
Anthony Mushrow16-Feb-11 17:28
professionalAnthony Mushrow16-Feb-11 17:28 
QuestionHow to split the frame as three part? [Solved] Pin
yu-jian15-Feb-11 14:43
yu-jian15-Feb-11 14:43 

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.