Example application for argument handling using docopt, for Rust and C++
GPL-3.0 License
Output a pyramid of smiley faces.
$ ./smileypyramid 18
)
:)
:-)
:):)
:-):)
:-):-)
:-):):)
:):):):)
:-):-):-)
:-):):-):)
:-):):):):)
:):):):):):)
:-):-):):-):)
:):):):):):):)
:-):):-):):-):)
:):):):):):):):)
:-):):):):):):):)
:-):-):-):-):-):-)
This is also an example application for argument handling using docopt
, for both Rust and C++.
Build and run with cargo
:
cargo run --release 18
Build with cxx
.
Install with:
install -Dm755 smileypyramid /usr/bin/smileypyramid
Build with cxx
.
Install with:
install -d /usr/local/bin
install -m755 smileypyramid /usr/local/bin/smileypyramid
docopt
docopt.cpp-git
libdocopt-dev
If docopt
is not installed in /usr/include
and /usr/bin
you might need to edit the Makefile
.