Fixed the rest of the code  hopefully for const char*, examples now run.

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>