Quote:
assignment4.c:2:1: warning: C++ style comments are not allowed in ISO C90
assignment4.c:2:1: warning: (this will be reported only once per input file)
assignment4.c: In function `main':
assignment4.c:55: error: `passptr' undeclared (first use in this function)
assignment4.c:55: error: (Each undeclared identifier is reported only once
assignment4.c:55: error: for each function it appears in.)
assignment4.c:56: error: `keyptr' undeclared (first use in this function)
assignment4.c:53: warning: unused variable `pass_input'
assignment4.c:54: warning: unused variable `key_input'
assignment4.c: In function `get_password':
assignment4.c:81: error: 'passptr' redeclared as different kind of symbol
assignment4.c:79: error: previous definition of 'passptr' was here
assignment4.c:81: warning: initialization makes integer from pointer without a cast
assignment4.c:86: warning: format argument is not a pointer (arg 2)
assignment4.c:83: warning: unused variable `keyptr'
assignment4.c: In function `get_key':
assignment4.c:99: error: 'keyptr' redeclared as different kind of symbol
assignment4.c:96: error: previous definition of 'keyptr' was here
assignment4.c:97: warning: unused variable `pass_input'
assignment4.c: At top level:
assignment4.c:109: error: syntax error before "keyptr"
assignment4.c: In function `encrypt':
assignment4.c:109: error: number of arguments doesn't match prototype
assignment4.c:32: error: prototype declaration
assignment4.c:111: warning: initialization from incompatible pointer type
assignment4.c: At top level:
assignment4.c:125: error: syntax error before "keyptr"
assignment4.c: In function `decrypt':
assignment4.c:125: error: number of arguments doesn't match prototype
assignment4.c:41: error: prototype declaration
Looking through your code, the problem is that you seem to lack the understanding of how to use function parameters. You're making up variables instead of using what you're given. Don't do that. Read a good tutorial on functions and parameters.