I am making a self extraction program in C. The code below is in a loop. Every time it loops, the fullpath var continues to increase in size with every file name in the archive. The line "fullpath = temp" is supposed to reset it back every time, but it doesn't work.
fullpath is a char *
temp is a char *
filename is a char[32]
Here is the part that is not working:
fullpath = temp;
strcat(fullpath, filename);
ext = fopen(fullpath, "wb");