added error messages
fixed bug with wrong cast after allocating memory, instead of char** use void**
added test with struct arrray elements