Why cant I use strings???

This error is given from this code, what am I missing?

line 29 : ERROR PHILLSFIRST.C : Invalid expression - need lvalue.

This is my code:

char t[256];
t=“why dont i work?”;

I know this must be something silly, please help.

You cant assign the string like in other software code here in DC.

instead use this code

sprintf(t, “%s”, “Now I work”);

You cant assign the string just like that. Its a drawback I know. But its the way DC is and we all have to deal with it. BTW, what the code does is to print the string to the variable. The style is same as printf, just imagine you are using printf.

Happy programming buddy.

it is standard C language… you have to use strcpy function to copy a string into a variable.

Thanks a bunch !!!

"); //use strcat function combine text