I am currently working with a program that makes files and i am having a bit of a problem...

FILE *outfile = fopen(name, "w");
// <-- it does not get past here, but still creates the file
fprintf(outfile, "%s\n", pword);

what am i doing wrong?? when the program gets to this point it crashes
P.S. tell me if you need more info...