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

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -