What you wrote in your original post doesn't work in C or C++ either (not without overloading the assignment operator for your struct, anyway).

Think about the implications of what you expect this code to do. If using assignment on an arbitrary struct instance would copy it over to the assigned-to struct, it would copy pointers too. What if your struct contains a pointer to some variable that should be allocated per-struct. When you copy that struct, it would copy the pointer, NOT the data pointed-to, so now you have two struct instances sharing the same pointee. Sometimes this is what you want, often it's not. In any case, you must specify what you want to do, so assignment of structs is not implemented in C.

You should copy the elements member by member, or with memcpy as HeelX pointed out.

Could you show the code where you tried to use memcpy?

BTW, memcpy works on the heap as well as on the stack in C++ (haven't tested with Lite-C, but would be strange if it behaved differently).