vendredi 1 janvier 2021

how to declare an array using a variable while receiving value of variable as input? Check my Code [duplicate]

int a;
cin>>a;
int arr[a];

I want to declare an array according to size of the user. I am new to programming . What can be done? Is this method correct?

Aucun commentaire:

Enregistrer un commentaire