Skip to main content
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 ...
Yuri Laguardia's user avatar
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 ...
Yuri Laguardia's user avatar
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. ...
Cliff B's user avatar
  • 69.2k
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. ...
Blauelf's user avatar
  • 21k

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