COMPARING float arrays and string arrays

Hey there I have to do a merge sort program which i have to compare two float arrays setting = and also string arrays

Can somebody explain me how do I compare them
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
void person::mergeFloat ( double *a[], int end1, int end2)
{
	int i = 0;
	int j = end2;
	int k = 0;

	double *temp = new double [end2];

	// Take each next smallest element

	while (i < end1 && j < end2)
	{
		if(a[i] < a[j])
		{
	
			double temp [k] = a[i];
		}
	}
}

void mergeString(string *a[], int end1, int end2)
{
	int i = 0;
	int j = end1;
	int k = 0;

	string *temp = new string [end2];

	while (i < end1 && j < end2)
	{
		if(a[i] < a[j])
		{
	
		float temp[k] =  a[i];
		}
	}
}
Topic archived. No new replies allowed.