C++: boost::lexical_cast Minimalbeispiel
English
Deutsch
boost_lexical_cast_example.cpp
#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; //Gibt 579 aus
}If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow