#include#include using namespace yarp; int main() { Bottle b; std::string str = "Hello, World!"; b.addString(str); return 0; }
#includeIn this example, we create a new Bottle object, and add two strings `"Hello,"` and `"World!"` to it using the addString function. The addString function is part of the YARP C++ library, which is a communication middleware that provides a convenient and powerful way to communicate between different software components.#include using namespace yarp; int main() { Bottle b; std::string str1 = "Hello,"; std::string str2 = "World!"; b.addString(str1); b.addString(str2); return 0; }