Hello,


I'm playing around with structures and lite-c for the first time. I'd like to store a string in my structure. I thought, instead of mess around with char* stuff, maybe I could use a "var" type.

Here's my example:

Code:

#define new(type) malloc(sizeof(type##))
#define delete(object) free(object)

// Item
typedef struct
{
int id;
var name;
} Item;

Item* sword = new(Item);

sword->name = "sword"; // This line causes the error



This results in an compile error: "Cannot convert array to fixed."

Any ideas?

Thanks,
- Bret