struct Sales_data
{
std::string bookNO;
int sold = 0;
double revenue = 0;
};
报错 error C2252: 'sold' : pure specifier can only be specified for functions
错误C2252:“出售”:纯说明符只能指定功能
我以前写C的时候创建结构体不都是这么写吗? 怎么会报错了呢
谢谢答复
...全文
932打赏收藏
为什么会报这个错误阿
#include #include //using namespace std; struct Sales_data { std::string bookNO; int sold = 0; double revenue = 0; }; 报错 error C2252: 'sold' : pure specifier can only be specified for functions 错误C2252:“出售”:纯说明符只能指定功能 我以前写C的时候创建结