i have a Select Sorting i having trouble With..
Inside my Main & inside my Global
the problem im having is i want to be able to sort my array but inside the main, its saying Semantic Issue, use of undeclared identifier 'X' and its saying Subscripted value is not an array,pointer or vector for
I'm using a Struct for the array.
and i have
Code:
template <class dType>
void selectSort( int x[], int n)
{
int smallPos, smallest;
for (int i=0; i <n; i++)
{
smallPos = i;
smallest = x[ smallPos];
for (int j=i +1; j < n ;j ++)
if (x[j] < smallest)
{
smallPos = j;
smallest = x [ smallPos];
}
}
}
Code:
void selectSort( int x[], int n);
Code:
else if ( choice == 2)
{
selectSort(x, n);
for( int i=0; i < n; i++)
cout << "Select Sorting is Done" << n[i] << endl;
}
Code:
cout << "Select Sorting is Done" << n[i]
and i have
Code:
student record[N_STUDENT];
int n;
int i;
for (int n = 0; n < N_STUDENT;n++)
Comment