c++ - what is wrong here -


   unsigned __int8 result[]= new unsigned __int8[sizeof(username) * 4]; 

intellisense: initialization '{...}' expected aggregate object

the types not same; cannot initialize array pointer.

new unsigned __int8[sizeof(username) * 4]; returns unsigned __int8*, not unsigned __int8[]

change code

unsigned __int8* result = new unsigned __int8[sizeof(username) * 4]; 

Comments

Popular posts from this blog

forms - Secure PHP File Upload Script -

PHP: Exploding array elements -

reflection - How to use FxCop CustomDictionary.xml from the project localization? -