这里有什么错 [英] what is wrong here
本文介绍了这里有什么错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
unsigned __int8 result[]= new unsigned __int8[sizeof(username) * 4];
IntelliSense:对聚合对象预期使用{...}初始化
IntelliSense: initialization with '{...}' expected for aggregate object
推荐答案
类型不一样;您不能使用指针初始化数组。
The types are not the same; you cannot initialize an array with a pointer.
new unsigned __int8 [sizeof(username)* 4];
unsigned __int8 *
,不是 unsigned __int8 []
将您的代码更改为
unsigned __int8* result = new unsigned __int8[sizeof(username) * 4];
这篇关于这里有什么错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文