1. What I learned
How to change a data type
When changing a data type, use ‘static_cast
2. Code
#include <iostream>
using namespace std;
int main(void) {
char ch;
cin >> ch;
cout << static_cast<int>(ch) << '\n';
return 0;
}
3. Result
Runtime : 0 ms, Memory usage : 2016 KB
(Runtime can be different by a system even if it is a same code.)