how to use char* as char[]
- by phunehehe
Hello, I have a struck like this
typedef struct bookStruct
{
char title[80];
char author[80];
} BookType;
And I have two strings like this
char *title = "A Book on C";
char *author = "A. Kelly";
Now I can't create a BookType like this
BookType book = {title, author};
Can anyone tell me what is wrong? How can I do that?