Casting
#include <iostream>
 
using namespace std;
 
int main()
{
    const int x = 5;
    int *ptr;
    ptr = (int*)&x;
    *ptr = 17;
    cout << x << endl;
    cout << *ptr << endl;
    return 0;
}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License