0
anshuverma1989's Avatar, Join Date: Apr 2009
Light Poster
Hey really sorry i couldnt understand this line debugging printf statements to the code

how can go about that?

Thanks
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Add a printf statement that prints something useful, e.g.
Code:
printf("Please enter a number: ");
char buf[32];
fgets(buf,30,stdin);
int n=atoi(buf);
printf("DEBUG: you entered %d\n",n);
So you can check the conversion was done properly and the program will continue with the expected value of n.
Applying that to your program then, you might want to print the contents of the murder object immediately after it was brought back from the file.