Hot answers tagged

2 votes
Accepted

PSet 2: Caesar, validating key

The problem lies here: if(isdigit(argv[1][i] != true) You need to fully understand how isdigit() works, specifically the return value, and the numeric value of true. The is() family of functions ...
user avatar
  • 63.1k
1 vote

Key looping in Vigenere

From Final Steps in the spec: Remember also that every time you encipher a character, you need to move to the next letter of k, the keyword (and wrap around to the beginning of the keyword if ...
user avatar
1 vote
Accepted

vigenere problem with key, the program sees the key as only one number

There are a number of issues here. First, the statement if (argc == 2 && isalpha(buk)) is redundant. If argc isn't 2, the program would have exited earlier. Similarly, isalpha(buk) was also ...
user avatar
  • 63.1k
1 vote
Accepted

Vigenere working unless there's an 'a' in the key. Please help!

Interesting interaction between different parts of the code. When there is an 'a' or an 'A' in the key it will fail because of a unique interaction in your code. The code first converts all of the key ...
user avatar
  • 63.1k
1 vote
Accepted

Vigenere - how to apply local variable in key to secret message

Your thoughts about why you're getting the error are on track. As declared in your code, the variable x only exists in the for loop where it is declared. Outside of the for loop, it is out of scope, ...
user avatar
  • 63.1k
1 vote

Vigenere key counts spaces in progression

It wasn't completely clear, but it seems that you are having a problem with your key advancing when non-alpha letters are processed. If this is the case, the relevant code is what isn't shown. My best ...
user avatar
  • 63.1k
1 vote
Accepted

compare value to key (dropoff)

You can still access the lat and lng of a house using something like HOUSES["Adams House"].lat; // access the lat HOUSES["Adams House"].lng; // access the lng and use these along with a method like ...
user avatar
  • 17.4k

Only top scored, non community-wiki answers of a minimum length are eligible