1) Can anyone tell how can i obtain the primary cd/dvd - rom path using C
2)
Check my code. I want to copy "setup.exe" using C programming. iF THE path does not contain spaces the copy of the file completes perfect but if i want to use spaces between the path nothing happens.
What can i do ?Code:#include <stdio.h> #include <stdlib.h> #include <Windows.h> #include <string.h> int main(void) { char cp[80] = "copy setup.exe " ,*destination; /*Allocate memory for strings*/ destination = malloc (40 * sizeof(char)); destination = "C:\\Program Files\\top"; strcat(cp,destination); printf("%s\n",cp); system(cp); return 0; }