0

When I run my code through check50, it prints out:

:( handles lack of argv[1]
\ wasn't expecting "/opt/sandbox50/bin/run.sh: line 31: 244..." on stderr.

I don't understand why this happens because if argc is not 2 then I print a message and return 1. My program actually works in this way; it doesn't accept an argc of 1. What does check50 mean by this error?

1
  • 1
    Could you include the Sandbox URL?
    – Nib
    Commented Sep 15, 2014 at 16:33

2 Answers 2

2

You are most likely checking if argc is correct after you've done something with argv[1]. Your argc check must be at the beginning of your program; otherwise you will segfault if argv[1] does not exist.

0

If this is for caesar.c, your output should be an error message written by you followed by the program ending without encrypting the message. I think vigenere is supposed to treat a null command line the same.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .