Contact: aviboots(AT)netvision.net.il
39,851 questions
51,772 answers
573 users
#include <iostream> int main() { int a = 123; int* const p = &a; std::cout << *p << ' ' << a << '\n'; *p = 99; std::cout << *p << ' ' << a << '\n'; int b = 905; // p = &b; // error: assignment of read-only variable āpā } /* run: 123 123 99 99 */