struct ret to_func;
strcpy(to_func.drive,a);
You declare your struct at the top of the function
size_show
, but you never initialise it. So when you try to copy something to
to_func.drive
it fails because you have an uninitialised pointer.
Also your drive specifications are wrong, you are using double forward slashes instead of backslashes, should be
"E:\\"
.
And it would help if you told us which line of code gives the error.