So I want to copy characters from a string into a second string until there is a space.
For example, the first string would say "Hello World" and after the loop the second string would say "Hello".
This is what I have tried so far, but when I compile it it gives me the error "error: ISO C++ forbids comparison between pointer and integer [-fpermissive]"
The error is on the line with the for loop.
If anyone knows what the problem is and how to fix it, or a different way of doing this it would be much appreciated.
Alright, thanks. It's compiling now, but when I run it a window pops up that says the program has stopped working. However it's just a standard Windows warning and gives no particular error. I'll post the full code, if someone could point out what I've done wrong I would be appreciative.
Thank you so much. For some reason at school I never had to put a null terminator at the end. In fact I don't even think they were discussed. Anyway, thanks again.