struct list_el {
unsigned int data;
char name[16];
char grade;
struct list_el * next;
};
typedef struct list_el item;
int main(int argc, char **argv) {
item *curr, *head;
//first item
curr->data = 3141592;
strcpy(curr->name, "Carl");
curr->grade = 'A';
curr->next = head;
head = curr;
Trying to figure out why this isn't working when I try to set name to "Carl". I'm getting "too few arguments to function 'strcpy'" even though I have 2 arguments in it (destination, source). When I add a 3rd argument (how many characters to copy?), I end up getting "assignment to expression with array type".
currbefore using it.itembut have not initialized it to an actual instance.#include<string.h>?