Skip to content

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

License

Notifications You must be signed in to change notification settings

xyproto/smileypyramid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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