Hello, I'm writing a program that requires me to rename/move a file from a temporary directory and store it in the current directory that I'm currently working under (which will be different for different computers that the program will be running on)
I've tried using the rename function in stdlib but i cannot get it to move to the proper directory. The rename function says that if the new file name given is in a different path than the old file name, it would move the file to the new location. I can rename the file, but I cannot get it to store in the current directory. I cannot specify the exact directory that i wish to store the file into, because that changes with each computer, like I said before. What I'd like it to do, is to store the file in the current directory (whatever it is) without me specifying it directly. I've tried not specifying any path (ie. just giving the file name) but that doesn't work, and I cannot find were the new file is stored.
So I'm hoping that someone can help me out with this problem. I've tried searching the web, but I can't seem to find anything the would help me out. So any help that you guys can provide me will be greatly appreciated
Thank you