抢分有关问题 关于typedef struce结构体指针有关问题
抢分问题 关于typedef struce结构体指针问题
定义了一个typedef类型的结构体,并声明1个结构体的别名和结构体指针别名
str1 s;
s.s1 = L"ss";
afxmessagebox(s.s1);
这么使用正常
如何使用pStr指针呢
速度抢分
------解决思路----------------------
str1 s;
s.s1 = _T("ss");
afxmessagebox(s.s1);
pStr ps;
ps=&s;
afxmessagebox(ps->s1);
------解决思路----------------------
一样的阿
Pice p;
pPos pPice = &p;
或者
pPice = new Pice;
PItems pItems;
pPice ->ItemsInfo = &pItems;
或者
pPice ->ItemsInfo = new PItems;
Invo(pPice);
typedef struct
{
CString s1;
CString s2;
}str1,*pStr;
定义了一个typedef类型的结构体,并声明1个结构体的别名和结构体指针别名
str1 s;
s.s1 = L"ss";
afxmessagebox(s.s1);
这么使用正常
如何使用pStr指针呢
速度抢分
------解决思路----------------------
str1 s;
s.s1 = _T("ss");
afxmessagebox(s.s1);
pStr ps;
ps=&s;
afxmessagebox(ps->s1);
------解决思路----------------------
一样的阿
Pice p;
pPos pPice = &p;
或者
pPice = new Pice;
PItems pItems;
pPice ->ItemsInfo = &pItems;
或者
pPice ->ItemsInfo = new PItems;
Invo(pPice);