New answers tagged pset2
1
vote
Accepted
CS50 Pset2 Substitution "expected prompt for input, found none"
Be very careful here
if (argv[k] == argv[r])
argv is the array of command line arguments. As such, argv[0] is ./substitution, argv[1] is the key, and argv[2] hits memory that doesn't belong to your ...
1
vote
Use of bool in PSET2
Your use of bool is correct, subject to the real problem. The function call isn't. I think your mind just got stuck using a pattern though. Look at the following code:
// Make sure every character ...
0
votes
Error when calling seconnd function - expected expression
It's a scope issue. k is declared inside the curly braces of the FOR loop. That means that when the code exits the for loop, k will cease to exist.
K should be declared outside of any loops or if ...
0
votes
CS50 Readability solution unsolvable to me
I can understand why you're having trouble fixing this. The good news is that it's an easy fix once you know what to look at.
Here's a really, really big hint:
In c programming, what's the difference ...
Top 50 recent answers are included
Related Tags
pset2 × 1274vigenere × 397
caesar × 311
initials × 120
check50 × 85
cs50x × 75
crack × 66
readability × 47
c × 45
segmentation-fault × 44
pset2-caesar × 37
pset2-crack × 29
pset2-substitution × 26
substitution × 25
vigenere.c × 23
error × 20
array × 19
string × 19
pset2-vigenere × 16
cipher-pset2 × 16
caesar-cipher × 14
crack.c × 13
command-line-arguments × 12
crypt × 12
key × 12