i was witing this code in c++ using the compiler "code blocks'. there were many errors which i managed to eliminate but didn't have my luck with this one . here's the code.
Why are you using the <string.h> C library? Since you are programming in C++ you should use the standard <string> library. It is more safer to use, too.