Answer the question
In order to leave comments, you need to log in
Why is the strcpy function not working?
There is an array of structural variables
struct EDB{
char *firstName[6];
char *secondName[6];
int age;
int weight;
} A[20];
strcpy(A[i+1].firstName, A[i].firstName);
strcpy(A[i+1].secondName, A[i].secondName);
A[i].age = A[i+1].age;
A[i].weight = A[i+1].weight;
Answer the question
In order to leave comments, you need to log in
strcpy(A[i+1].firstName, A[i].firstName); ... A[i].age = A[i+1].age;
the essence of this particular piece of the task is deleting a line with data (I do it by reassigning to the next line and reducing the number of lines by one)
strcpy copies the second argument to the first as an assignment operator.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question