Firstly NEVER use void main() always int main() (of some variation).
Secondly do you know how functions work?
void selectionSort(int onestudent[], int x);
What is that doing inside your main method?
void selectionSort(student onestudent[] , int listLength);
void selectionSort(student onestudent[], int listLength){
for (int i = 0 ; i <= listLength-1 ; i++){
if(strcmp(onestudent[x].id_number,onestudent[x+1].id_number)> 0){
strcpy(temp,onestudent[x]);
strcpy(onestudent[x],onestudent[x+1]);
strcpy(onestudent[x+1],temp);
}
}
}
Note i also changed the function declaration to student rather than int & variable names changed so they actually matched!
And i used [code=cplusplus] [/code] so formatting is kept. I also re-indented the code for you so it is more re-adble to others, so they can look at you so called selection sort.
Chris