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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
key × 19pset2 × 12
vigenere × 12
caesar × 3
loop × 2
lowercase × 2
pset6 × 1
cs50x × 1
pset7 × 1
pset8 × 1
dictionary × 1
pset × 1
dna × 1
index × 1
command-line-arguments × 1
portfolio × 1
argv × 1
cs50-pset2 × 1
spaces × 1
argc × 1
encryption × 1
cypher × 1
validatingthekey × 1
value × 1
validate × 1