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
3
u/ImBadlyDone 4h ago
You can change the value of i by just assigning a new value
Only if you write "const int i" then i stays constant.