Hello everyone, I'm new to the boards and C++ and had a quick question.
I wrote a program for a friend in C++ that opens a file, XOR encrypts it, and outputs it to another file based on a key that a user inputs.
I went through the tutorials found here on cprogramming.com, and saw the part about strcat, where it says to be careful with this function as it assumes the destination string is large enough for the source string you're trying to concatenate onto the end of it.
I also learned the same about the gets() function and am now using fgets() instead.
My question is... Is there a safer alternative to strcat that will do the same thing that fgets does (chop off anything larger than can fit in the destination)?
Thanks in advance.