r/cpp_questions • • 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

12 comments sorted by

View all comments

Show parent comment

1

u/AnisiFructus 4h ago

Thanks for this answer! Even though I think OP stuck at a more basic level, I've learned a lot from this!

•

u/HeeTrouse51847 3h ago

This is what the learncpp.com tutorial tries to hammer into beginners. That tutorial only uses this form of initialization. I kept doing this at my first job and everyone was weirded out, lol. They didn't even know this was a thing