Why does my program crash upon writing to a file?
问题 I know I really shouldn't ask for bug solutions here in Stack exchange, but I'm new to C and I made a program that unrolls code and prints the code out in a .c file. The problem is that when I want to print out some lines of code, the fputs function to codeOutput crashes the program(I've debugged it this far). I've tried changing the codeOutput file from .c to .txt, but it hasn't changed anything. I know this code excerpt is not really repeatable, but I'm sure I just made a dumb mistake in