3
votes
Error in my pset4 resize.c code
The width of your image is 3. When you use that minus sign here fseek(inptr, -bi.biWidth * sizeof(RGBTRIPLE), SEEK_CUR);
, it becomes -3.
But before the multiplication takes place, C rules of ...
2
votes
Accepted
getting runtime error: unsigned integer overflow
About the overflow, read this:
Error in my pset4 resize.c code
Apart from that, what's happening is that you're copying the headers to bi and bf, but you're not copying those headers also to bfNew ...
1
vote
Accepted
cash CS50 2020 pset1 modulo
Why are you using modulo for this? It produces an unreliable result in this usage. Further, the actual numbers don't make sense.
The modulo function returns the remainder after an integer division. ...
1
vote
Accepted
Vigenere error compiling: type int vs unsigned long
I assume the % strlen(key) is causing some type conversion.
Your logic is wrong. First iterate the key to ensure all characters are alphabetic, and maybe also uppercase the key there if you want. ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
unsigned-integer-overflow × 4pset4 × 2
resize × 2
cs50x × 1
vigenere × 1
modulo × 1
cs50-pset1 × 1
int × 1
cash.c × 1
ps2 × 1