Decided to go back and simplify things, so i got a better understanding of how things work. My question is, can i Loop the strcpy function?
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int main(int argc, char *argv[]){
char wordlibrary[5][21] = {{"luke"},{"lukeson"},{"liar"},{"abstract"}, {"liar"}};
char wordbackup[5][21] = {{0},{0},{0},{0},{0}};
int f = 0;
wordlibrary[f];
while (f <= 4){
printf("%s\n", wordlibrary[f]);
f++;
}
/*f = 0;
int g = 0;
wordbackup(g);
while ((f<=4) && (g<=4)){
strcpy(wordbackup[g], wordlibrary[f]);
f++;
g++;
}*/
char onew[21] = {"system"};
char empty[21] = {0};
strcpy(empty, onew);
printf("%s\n", empty);
return 0;
}
I commented out my loop here, but when not commented out i get the following error.
Line 21. "Term does not evaluate to a function taking arguments
Please and Thank You.