you can't figure out what the error is ? For starters, your brackets don't line up.
what I meant to say was, don't ask us to tell you how to fix an error, and not tell us the error message. Also, \n is not a newline, \r\n is. That won't break the code, but it will change the result.
Also, you don't return anything, so it still wouldn't compile after you fix the brackets. Finally, if you meant C++ and not C, string.h is NOT part of C++.