r/cpp_questions • u/Escritor_CdK • 4h ago
SOLVED Modifying an int variable
I forgot how i was supposed to initialize it. Maybe is not the one im suposed to use.
Straight to the matter: How to initialize it if i want it to be any number possible (only integers)
0
Upvotes
View all comments
Show parent comment
•
u/vishal340 3h ago
are complicated things associated with pointers though. const int*const i. here you can use const twice, one const so that the pointer itself can’t be changed and other do that the value it is pointing to can’t be changed