结构体指针赋值
lp104 2008-02-22 01:50:53 我定义的结构体和函数
struct Info{
char cBM[10];//编码
char cSM[50];//说明
}epayinfo,*p;
void test(struct Info * p);
并且把值也赋好了,想把结构体的值传给函数test(p),进行其它操作。
p=epayinfo;
调试报错:
E:\ctc\vc\CSocket\CSocketDlg.cpp(321) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'struct CCSocketDlg::EpayInfo' (or there is no acceptable conversion)
什么原因?