Hi, i'm having a problem with the following structure I created. I'm getting an error message that rd.name is not an l-value. I don't understand why the compiler is not recognizing it as an l-value. Here's the code:
Thanks in advance for help anyone has to offer.Code:#include <stdio.h>
int main()
{
struct record
{
char name[12];
short age;
int salary;
};
struct record rd;
rd.name = "James Freda";
rd.age = 24;
rd.salary = 20000;
printf("My name is %s, I am %h years old, and \
my salary is %d. Not much huh?\n\n", rd.name,rd.age,rd.salary);
return 0;
}