How to turn an integer variable into a char c++

#include <iostream>

int main() {
    int intValue = 65;  // Step 1: Declare and initialize an integer variable

    char charValue = static_cast<char>(intValue);  // Step 2: Use static_cast to convert the integer to a char

    std::cout << "Integer value: " << intValue << std::endl;
    std::cout << "Char value: " << charValue << std::endl;

    return 0;
}