Hi,
I wish to remove the extra unwanted characters in the file name.
f1::f1(char *filename1)
{
char file_txt[40];
strcpy(file_txt,filename1);
strcat(file_txt,".txt");
system("rm file_txt");
}
In debug mode when i check the value of file_txt i get :
file_txt = "../../input.txt\000\000\000\000F\000\000\000\001\000\000\000\001\000\000\000\v\000\000\000\002\000\000\000\000\000\000\000\001\000\000"
I do not know hoe to get rid of the extra characters "\000\000\000" at the end of the file name.
Any help is appreciated.
Thanks