This is my code :
int x=65;
char ch{x};
And this is the warning when compiled with `-std=C++11 flag:
Narrowed conversion from "int to char"
But I think there should be an error as x
is not a constant and we are initializing ch with a non-constant value.
What actually happens?
Aucun commentaire:
Enregistrer un commentaire