This is part of the code I'm facing issue with :
void encrypt(const char *fileIn, const char *fileOut, const unsigned char *key);
int main(int argc, char *argv[])
{
const unsigned char key[100];
srand(time(NULL));
aes_init();
encrypt(argv[1], "/home/python/encrypt/"argv[1]".encrypted", argv[3]);
return 0;
}
As you can see, in the encrypt function, I'm asking the user to enter the file name via command line for input. For output of the same function, I wanted the same name to be just appended by '.encrypted'. However, I get the following error whenever I try to compile the code.
In function ‘main’:
error: expected ‘)’ before ‘argv’
error: too few arguments to function ‘encrypt’
note: declared here
What am I doing wrong? Please help.
"/home/python/encrypt/"argv[1]".encrypted"this is how you manipulate it? what you want here?