Hello. It's safe to say I suck at programming and it's really hard for me to wrap my head around some of the concepts, but I really enjoy it. Right now I am trying to right a program to fix damaged image files. The files (.bmp, .gif, .png, and .jpg) have had their extensions and dimensions (except .jpg) removed. I need to process directories and find all the files and fix/rename them with their correct extension and dimensions. Also, I am using VS2013 to write this program.
Right now I am trying to write a function to pass the directory received from the command line arguments (argv[2]) to the _chdir function so I can validate that it is a directory. The problem with this is that _chdir function only takes a pointer to a 1D array as an argument. So, how can I pass the directory command line argument (pointer to a 2D array) to the _chdir function?
Right now I just have the specific directory as the argument for the _chdir function to confirm that it wokrs and print out all of the files in it, but I can' figure out how to get it to work if someone else was to run the program and they want to just run the program without having to edit the code and give the _chdir function the full path before every time they run it.