I have declared an char array in my structure.After creating instance of the structure,i initialized its members in following way.
structure student
{
char name[20];
int rol_no;
}
int main()
{
student s1;
s1.name = "jimmy";
// some more statements..
}
this code gives me compilation error as "lvalue required before '=' operator "
Can anyone please explain me why??
structure student
{
char name[20];
int rol_no;
}
int main()
{
student s1;
s1.name = "jimmy";
// some more statements..
}
this code gives me compilation error as "lvalue required before '=' operator "
Can anyone please explain me why??
Comment