Click here to Skip to main content
15,919,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: string operation Pin
CPallini22-Nov-11 21:45
mveCPallini22-Nov-11 21:45 
GeneralRe: Here is simple loop to collect all the names Pin
Software_Developer22-Nov-11 22:09
Software_Developer22-Nov-11 22:09 
QuestionHow to grant access rights Pin
William Engberts22-Nov-11 2:07
William Engberts22-Nov-11 2:07 
AnswerRe: How to grant access rights Pin
Chris Meech22-Nov-11 3:02
Chris Meech22-Nov-11 3:02 
GeneralRe: How to grant access rights Pin
William Engberts22-Nov-11 3:09
William Engberts22-Nov-11 3:09 
GeneralRe: How to grant access rights Pin
Chris Meech22-Nov-11 3:13
Chris Meech22-Nov-11 3:13 
QuestionHow to create 2 tree view in one window Pin
akash chourasia22-Nov-11 1:15
akash chourasia22-Nov-11 1:15 
AnswerRe: How to create 2 tree view in one window Pin
_AnsHUMAN_ 22-Nov-11 1:40
_AnsHUMAN_ 22-Nov-11 1:40 
GeneralRe: How to create 2 tree view in one window Pin
akash chourasia22-Nov-11 17:54
akash chourasia22-Nov-11 17:54 
AnswerRe: How to create 2 tree view in one window Pin
Roger Allen22-Nov-11 2:10
Roger Allen22-Nov-11 2:10 
QuestionClose documents problem Pin
_Flaviu22-Nov-11 0:30
_Flaviu22-Nov-11 0:30 
AnswerRe: Close documents problem Pin
Roger Allen22-Nov-11 2:14
Roger Allen22-Nov-11 2:14 
GeneralRe: Close documents problem Pin
_Flaviu22-Nov-11 2:43
_Flaviu22-Nov-11 2:43 
AnswerRe: Close documents problem Pin
Stefan_Lang22-Nov-11 3:50
Stefan_Lang22-Nov-11 3:50 
GeneralRe: Close documents problem Pin
_Flaviu22-Nov-11 9:17
_Flaviu22-Nov-11 9:17 
GeneralRe: Close documents problem Pin
_Flaviu22-Nov-11 9:24
_Flaviu22-Nov-11 9:24 
GeneralRe: Close documents problem Pin
Stefan_Lang22-Nov-11 21:59
Stefan_Lang22-Nov-11 21:59 
GeneralRe: Close documents problem Pin
_Flaviu23-Nov-11 2:46
_Flaviu23-Nov-11 2:46 
GeneralRe: Close documents problem Pin
_Flaviu23-Nov-11 20:25
_Flaviu23-Nov-11 20:25 
QuestionMainWindow of dll how to launch from client exe Pin
appollosputnik21-Nov-11 16:06
appollosputnik21-Nov-11 16:06 
AnswerRe: MainWindow of dll how to launch from client exe Pin
Richard MacCutchan21-Nov-11 21:29
mveRichard MacCutchan21-Nov-11 21:29 
GeneralRe: MainWindow of dll how to launch from client exe Pin
appollosputnik22-Nov-11 5:11
appollosputnik22-Nov-11 5:11 
GeneralRe: MainWindow of dll how to launch from client exe Pin
Richard MacCutchan22-Nov-11 6:18
mveRichard MacCutchan22-Nov-11 6:18 
QuestionBALANCED merge sort Pin
sadas232341s21-Nov-11 10:40
sadas232341s21-Nov-11 10:40 
What does that mean, and what is the difference between just merge sort? Here is the code I use for just merge sort. How to make it BALANCED.

C++
void Merge(int arr[], int low, int high, int mid)
{
	int i, j, k, c[50];
	
	i = low;
	j = mid + 1;
	k = low;

	while((i <= mid) && (j <= high))
	{
		if(arr[i] < arr[j])
		{
			c[k] = arr[i];
			
			k++;
			i++;
		}
		else
		{
			c[k] = arr[j];
			
			k++;
			j++;
		}
	}

	while(i <= mid)
	{
		c[k] = arr[i];
		
		k++;
		i++;
	}

	while(j <= high)
	{
		c[k] = arr[j];
		
		k++;
		j++;
	}

	for(i = low; i < k; i++)
	{
		arr[i] = c[i];
	}

	UpdateData(arr, high + 1);
} 

void MergeSort(int arr[], int low, int high)
{
	int mid;
	
	if(low < high)
	{
		mid = (low + high) / 2;
		
		MergeSort(arr, low, mid);
		MergeSort(arr, mid + 1, high);
		
		Merge(arr, low, high, mid);

		SwapsCount++;
	}
}
<pre lang="c++">

QuestionCalculating Megabytes from ULONG Pin
jkirkerx21-Nov-11 8:18
professionaljkirkerx21-Nov-11 8:18 

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.