Actually, there are includes in that code and I did say how the
program is called from the command line. It's:

program -encode KEY

argv[0] = program
argv[1] = encode
argv[2] = KEY

I have altered the code and now you can find it here
http://pastie.org/300724, it's better this way with the syntax
highlighted.



--- In [email protected], "David Hamill" <[EMAIL PROTECTED]> wrote:
>
> There are several things which prevent me from running your 
> C code. No #includes are given (though I can guess that 
> stdio.h, stdlib.h and string.h are needed). You need to 
> #define CBASE. And you don't seem to use argv[1] at all.
> 
> You should also put in a check that argc == 2, if that's 
> what's needed, and exit gracefully if it isn't.
> 
> You don't say how the program is called from the command 
> line, i.e. what argv[1] and argv[2] are supposed to be.
> 
> If you put these things right we may be able to help. It 
> seems likely to be a classic out-by-one error!
> 
> David
>


Reply via email to