Yet Another Robot Platform

How to construct a very simple bottle. See also os/browse_bottle.cpp example.

* Copyright (C) 2006-2019 Istituto Italiano di Tecnologia (IIT)
* Copyright (C) 2006-2010 RobotCub Consortium
* All rights reserved.
* This software may be modified and distributed under the terms of the
* BSD-3-Clause license. See the accompanying LICENSE file for details.
#include <stdio.h>
#include <yarp/os/Bottle.h>
using namespace yarp::os;
int main() {
// create a bottle representing the list (5,"plus",2,"is")
Bottle b("5 plus 2 is");
// add an integer that is the sum of element 0 and 2
// print the result -- "result: 5 plus 2 is 7"
printf("result: %s\n", b.toString().c_str());
return 0;