boost::lexical_cast minimal example
#include <boost/lexical_cast.hpp>
#include <iostream>
int main() {
int a = boost::lexical_cast<int>("123");
int b = boost::lexical_cast<int>("456");
int c = a + b;
std::cout << c << std::endl; //Prints 579
}
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow