64,642
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
#include <wtypes.h>
using namespace std;
struct abc{
LPSTR *str;
};
int main()
{
CHAR *src = "Hello";
abc *data = new abc;
data->str = &src;
cout << *(data->str) << endl;
return 0;
}
CHAR *src = "Hello";
abc *data = new abc;
*(data->str) = src;
cout << data->str << endl; // 报内存错误
//具体点,想要干啥?
*(data.str)