I am so lost. I don't know what I'm doing. Can somebody help me? What I'm trying to do right now is just store ID numbers in an array to use them elsewhere in my program. I can't even do that right though. This is my first time taking computer science and I just don't get it.
#include <stdio.h>
#include <stdlib.h>
int GetID( int students, int StoreID[41], int i);
int main(void)
{
int students;
int StoreID[41];
int i;
printf("Enter the number of students in the class:");
scanf("%d", &students);
GetID(students,StoreID[],i);
return EXIT_SUCCESS;
}
int GetID( int students,int StoreID[41], int i)
{
printf("Student\n");
for( i=0; i<students; i++)
{
printf("Enter student%d ID:", i+1);
scanf("%d", &StoreID[i]);
}
printf("%d\n", StoreID[i]);
return StoreID[i];
}
In function 'main':
15: Warning: passing argument 2 of 'GetID' makes pointer from integer without a cast.