When executing a simple program I created through tutorials I am working through I am told by my OS that using gets is unsafe.
Is there an alternative to it that will allow strings to be entered, besides scanf() which seems to only accept a predefined number of variables.
gets(input); allows me to accept unlimited input regardless of whitespace
scanf("%s", input); only allows me to capture one word of the input.
I don't imagine it's wise to ignore OS warnings of this type, so if someone can tell me a better "safe" way to do this, please do.