Couple errors please help :-D
Error 1: backup.c:54: error: 'stdbackup' was not declared in this scope
stdbackup declaration: void stdbackup(char* origPath, char* backupPath)
call to stdbackup: stdbackup(dir_to_copy, strcat(dir_to_copy, "BackStd"));
dir_to_copy declatartion: char dir_to_copy[MAX_DIR_PATH + 1];
dir_to_copy assignment: getcwd (dir_to_copy, MAX_DIR_PATH + 1);
1. Is dir_to_copy supposed to be a char*? Because I tried that and then I just got a bunch of errors saying cannot convert 'char**' to 'char*'.
2. In the call to stdbackup will having the strcat in there allow me to send the two slightly different paths or will I have to put the new path in a new variable? char or char*?
3. What do I do to fix that error?
Error 2: backup.c:151: error: invalid conversion from 'int' to 'FILE*'
error line: f_from=open(strcat(backupPath, entry->d_name), 777);
f_from declaration: FILE *f_from;
backupPath declaration: void sysbackup(char* origPath, char* backupPath) //backupPath is an argument taken in from the function call
entry declaration: struct dirent *entry;
entry assignment: entry = readdir (dir)
dir declaration: DIR *dir;
dir assignemtn: dir = opendir (".");
1. Totally confused at what's going on. How do I fix it?
2. Please don't tell me to change open to fopen, can't, it's homework and we can't use fopen.... have to use the system call
Please make any suggestions or link to me to anywhere that might help.