Hi I've been trying to work on this assignment for a while now and I am stuck. I am not sure how to use the command line argument. This is just one part of the assignment, I would like some help getting started on this assignment to help me figure out how to do the rest of it.
Commands
Add Command: A
<FirstName> <LastName> <StdID> <MathGrade> <MusicGrade> <PEGrade>
For this command the program should add a new student with the given information to the list of thestudents. The program should not print anything for this command.
This is what I have, any help would be appreciated. thank you.
insert
Code:
int main(int argc, char *argv[])
{
char ch, *p, *q;
char A[STR_LEN + 1], L[STR_LEN + 1], *first[STR_LEN + 1], *last[STR_LEN +1], stdID[1000];
p = &first[0];
int i;
while(ch != 'Q')
{
scanf("%s", &A);
if(ch == 'A')
{
printf("%s", argv[0]);
for (i = 0; i < argc; i++)
{
printf("%s", argv[i]);
}
}