>Isnt he forgeting to #include <string.h>?
None of the code posted previously has used anything from <string.h> (which should be <cstring> to be correct C++).

>if you wanted the user to input something with spaces for example
Well, yes. That's correct. However, both your code and your post have no bearing on the question, which is most likely an incorrect installation of the compiler.