1>g:\microsoft visual studio 10.0\vc\atlmfc\include\afxinet.h(166): error C2248: “CObject::operator =”: 无法访问 private 成员(在“CObject”类中声明)
1> g:\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(535) : 参见“CObject::operator =”的声明
1> g:\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(509) : 参见“CObject”的声明
1> 此诊断出现在编译器生成的函数“CInternetSession &CInternetSession::operator =(const CInternetSession &)”中
原因在于我在代码里使用了
CInternetSession m_pSession;
m_pSession =NULL;//就是这一句,不能这么使用
微软将Object类的操作运算符设置为private,非要使用到话,重载操作符。
参考https://blog.youkuaiyun.com/bao_bei/article/details/46966067