这样是可以,但是不知这样有何用,:-)#include <stdio.h>#include <string.h>struct A{ const char *s;};int main(int argc, char **argv){ struct A a; const char *c = "haha"; //a.s = c; // error: assignment of read-only member ‘s’ memcpy(&a.s, &c, sizeof (size_t)); printf("a.s=%s\n", a.s); return 0;}