argv[1] and argv[3], if available, are strings. Convert them to integers before attempting to add them; atoi may be useful for this.
argv[2] is a string also. Use argv[2][0] for the first character.
[edit]D'oh! Didn't even look at main, which should be declared like this:
int main(int argc, char *argv[])
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314