c - 预期 'const csim_stats_t * {aka const struct*}' 但参数的类型为 'csim_stats_t * {aka struct*}'
问题描述
如标题所述,我正在尝试初始化变量结果,但出现以下错误
expected 'const csim_stats_t * {aka const struct <anonymous> *}' but argument is of type 'csim_stats_t * {aka struct <anonymous> *}'
因此,我无法在struct csim_stats_t
. 有人可以帮忙吗?
我的结构被定义为:
typedef struct {
long hits;
long misses;
long evictions;
long dirty_bytes;
long dirty_evictions;
} csim_stats_t;
解决方案
推荐阅读
- c++ - 为什么我会得到 std::exp 的特定于平台的结果?
- python - 连接到 sqlite 数据库时出现 sqlalchemy.exc.InvalidRequestError
- ruby-on-rails - 乘客 3.x 独立二进制文件连接超时
- python - 如何在张量流中制作自定义激活函数
- python - 自定义模板标签获取上下文:为什么上下文是 RequestContext 而不是字典?
- reactjs - React - 即使在我设置状态后输入字段也无法编辑
- c# - 我想在 MVVM 中使用 ListBox 的 SelectionChangeEvent
- keycloak - 如何扩展 keycloak 以支持指纹认证
- powershell - 将 pom.xml 版本转换为数字格式
- sql - 删除 Oracle 表中的重复行