linked to ncurses when building examples.
explicity cast variables, added scope resolution.
initial example commit.
added createing example.