Question
i have error in atexit(report_mem_leak); how to solve it ? #include #include #include #include #includeleak-detector-c.h typedef struct monster { int id; char *name; char *element;
i have error in atexit(report_mem_leak); how to solve it ?
#include
int main(void){ //for creating the file that contains the information about the memory leak atexit(report_mem_leak); //file to take input from FILE *fptr; fptr = fopen("in.txt","r"); monster *mstruct; int nmonster,nregion,ntrainer,i,j,k; char vmonster[24],vregion[24],vtrainer[24],string[50]; fscanf(fptr,"%d",&nmonster); fscanf(fptr,"%s",vmonster); mstruct = (monster *)malloc( sizeof(monster) * nmonster); for(i=0;i
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started