Skip to content

Latest commit

 

History

History
83 lines (60 loc) · 2.89 KB

CppHelloBoost.md

File metadata and controls

83 lines (60 loc) · 2.89 KB

 

 

 

 

 

 

Hello Boost is an extension of Hello World. Like Hello World, Hello Boost is a simple console application. Hello Boost, however, also requires the Boost library and to link against the Boost.Regex library.

 

The base code of Hello Boost is:

 


#include <iostream> #include <boost/regex.hpp> int main() {   std::string s = "Hello World";   s = boost::regex_replace(s,boost::regex("World"),std::string("Boost"));   std::cout << s << '\n'; }

 

Here are some detailed examples of Hello Boost, depending on IDE and operating system: