【发布时间】:2019-09-09 20:39:55
【问题描述】:
我正在为 WinCE 编写加密/解密程序。
当我编译程序时,我得到如下错误: 错误 C2227:'->yr' 的左侧必须指向类/结构/联合/通用类型
sn-p 是:
void ai(struct AES_ctx* ctx, const uint8_t* key)
{
k(ctx->yr, key);
}
以及对应的header sn-p:
#define AES_BLOCKLEN 16
#define AES_KEYLEN 32
#define AES_keyExpSize 240
struct AES_ctx
{
uint8_t yr[AES_keyExpSize];
uint8_t Iv[AES_BLOCKLEN];
};
void ai(struct AES_ctx* ctx, const uint8_t* key);
使用 StandardSDK_500 ARMv4I 编译器工作正常,但使用 MIPSII 我得到了这个。
谁能帮忙解决这个错误?
【问题讨论】:
-
也许是
ai(AES_ctx* ctx? -
我无法让这个错误出现在这个 sn-p 中。你确定它在那条线上?其余的错误是什么(应该有
note: type is 'const uint8_t *'之类的东西)。当您尝试将->与指向非类类型的指针一起使用时,就会发生这种情况。
标签: c++ encryption visual-studio-2005