结构体里的string赋值问题
#include<string>using namespace std;struct temp{string s;};int main(){const string p="aaa";temp *q;q=(struct temp*)malloc(sizeof(struct temp));q->s=p;}