smileypyramid

Example application for argument handling using docopt, for Rust and C++

GPL-3.0 License

Downloads
2.1K
Stars
4
Committers
2

Smiley Pyramid

Output a pyramid of smiley faces.

$ ./smileypyramid 18
)
:)
:-)
:):)
:-):)
:-):-)
:-):):)
:):):):)
:-):-):-)
:-):):-):)
:-):):):):)
:):):):):):)
:-):-):):-):)
:):):):):):):)
:-):):-):):-):)
:):):):):):):):)
:-):):):):):):):)
:-):-):-):-):-):-)

This is also an example application for argument handling using docopt, for both Rust and C++.

Rust version

Build and run with cargo:

cargo run --release 18

C++ version

Installation

Build with cxx.

Linux

Install with:

install -Dm755 smileypyramid /usr/bin/smileypyramid

BSD or macOS

Build with cxx.

Install with:

install -d /usr/local/bin
install -m755 smileypyramid /usr/local/bin/smileypyramid

Requirements

If docopt is not installed in /usr/include and /usr/bin you might need to edit the Makefile.

General info