Converting numbers - the easy way

Good morning everyone,

I'm a games/apps developer and right now I'm developing games/apps for iOS, Android and also PC / Facebook. I've also been working on C++ for some time but since I'm learning it all by myself, I still have some beginner doubts, like this one I'm posting today.

Is there any easy way to code a value conversion (for example an octal value to an actual number)?

Thanks!
Last edited on
Last edited on
Is there any easy way to code a value conversion
From where to where? Where is it stored? How do you want to save it?

Common case (octal representation in std::string):
1
2
3
std::string oct = "24";
int x = std::stoi(oct, nullptr, 8);
std::cout << x;
20
Topic archived. No new replies allowed.