class Rule
{
public:
Rule();
virtual ~Rule();
struct Swap{
char * oldContent;
char * newContent;
};
struct Url{
char * url;
char * md5;
Swap SquidSwap[3];
};
struct UrlList{
Url* SquidUrl;
}UrlList;
};
extern Rule SquidRule;
这是我创建的类,我想在主函数main中动态创建UrlList: SquidRule.UrlList.SquidUrl = new SquidRule.Url[5];这样做出错,请问是什么原因呢?正确的做法是什么呢?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
小伙看你根骨奇佳,潜力无限,来学PHP伐。