I have a pretty big program that I need to put into pointer notation. I really don't even know where to start. The program has 4 functions. After I learn how to do the first function, I'm sure I'll be able to do the rest on my own, I just need help starting it.

Code:
```int main()
{
void sort( int [], int );

int i, score[25], n = 0;

// Input
cout << "Enter first score: ";
cin >> score[n];
while( score[n] != -999 )
{
n++;
cout << "Enter Score (-999 to end): ";
cin >> score[n];
}

// Sorted Scores
sort( score, (n-1) );
cout << "Sorted scores:\n";
for(i=0; i<n; i++)
{
cout << score[i];
if(i<(n-1)) cout << ", ";
cout << endl << endl;
}

void sort( int a[], int n ) // Function header
{
int i, j, temp;

for(i=0; i<n; i++)
{
for(j=(i+1); j<=n; j++)
{
if( a[j] > a[i] )
{
temp = a[i];
a[i] = a[j];
a[j] = temp;
}
}
}

return;
}```

2. Code:
`name[index] == *((type*)name + index)`

3. I just got it working properly. Thanks. I'll post if I need help on any other of the functions.

Code:
```#include<iostream>
using namespace std;

int main()
{
void sort( int [], int );

int i, score[25], n = 0;

// Input
cout << "Enter first score: ";
cin >> score[n];
while( score[n] != -999 )
{
n++;
cout << "Enter Score (-999 to end): ";
cin >> score[n];
}

// Sorted Scores
sort( score, (n-1) );
cout << "Sorted scores:\n";
for(i=0; i<n; i++)
{
cout << score[i];
if(i<(n-1)) cout << ", ";
cout << endl << endl;
}

system("pause");

return 0;
}

void sort( int a[], int n ) // Function header
{
int i, j, temp;
int *ptr;

ptr=a;

for(i=0; i<n; i++)
{
for(j=(i+1); j<=n; j++)
{
if(*(ptr+j) > *(ptr+i ))
{
temp = *(ptr+i);
*(ptr+i) = *(ptr+j);
*(ptr+j) = temp;
}
}
}

return;
}```

4. Originally Posted by User Name:
Code:
`name[index] == *((type*)name + index)`
The (type *) [also known as a cast or more properly as an "explicit conversion"] is unnecessary in this.

In this case, the problem is converting code from using "array notation" to "pointer notation". If an explicit conversion is necessary to achieve that, then it's a sign of a huge mistake in the conversion.

5. Alright, I've become stuck on the last function that I have to convert. It's a function to calculate the median. My book keeps showing and talking about pointers within a loop. Since this is not in any sort of loop, I don't really know the proper syntax or way of going about it. Thanks!

Code:
```float median( int grade[], int n ) // Function header
{
int *ptr;
float median;
int a, b;

a = n / 2;
b = a + 1;

if(n%2 ==0) //even
{
}
else //odd
{
}
return median;
}```

6. What exactly is the problem?
Also, your previous code is in need of indentation.
And your book seems to be a C book. Suggest you switch.

7. Originally Posted by Elysia
And your book seems to be a C book. Suggest you switch.
A C book that teaches the use of cout?

8. A C book in sense that it does things like this:

>> int *ptr;