I have a program I am writing for uni in C, and when my code reaches this line:
strcat("md5 ", "blah");
I am getting a EXC_BAD_ACCESS error, and my app crashes. As far as I can tell, there isn’t anything wrong with it, so I thought a fresh pair of eyes might solve my problem. Any ideas?
You’re trying to modify a constant string. The first argument of
strcatis also the destination string and in your case it is a constant string. You should use something like: