So I've been trying to use strcat like this lately and I've always got an error:
strcat(string, 'a');
And then I realised that I have to use something which contains '\0' as the second parameter, in order to have a const char* .
Well, I was just playing around in VS, and using strcat like this:
strcat(string, "a");
rendered no error.
This is very strange to me, because some days ago I've learnt that I need to create an auxiliary char, like this:
aux[0] = 'a';
aux[1] = '\0';
strcat(string, aux);
if I wanted to add only a character to a string.
Now I'm a bit lost to be honest.
Can anybody explain what's the difference between ' and " when using chars?
Thanks.