jeudi 2 novembre 2017

C++: how to assign static array to a pointer

I'm trying to assign a static array to a pointer

int * var = {1,2,3}

But that doesn't work

error: scalar object 'var' requires one element in initializer

Aucun commentaire:

Enregistrer un commentaire