#includeint main(){ yarp::os::Bottle b; b.addList() .addInt(1) .addInt(2) .addInt(3); return 0; }
#includeIn this example, a Bottle object is created and a vector of doubles is added using addList() function. The addVector() function is used to add the vector to the Bottle object. The library package for this function is the YARP library.int main(){ yarp::os::Bottle b; std::vector myvec = {1.23, 2.34, 3.45}; b.addList().addVector(myvec); return 0; }