2 votes
Accepted

pset 2 initials (less); "expected prompt for input, not output of..."

Did the instructions say to print "What is your full name?" One of the hidden lessons of the first few psets is to write the code exactly to the specification. Any extra or missing prompts, spaces, ...
user avatar
  • 63.4k
2 votes

MarioLess - declaration shadows a local variable error

Look at this code: int h = get_positive_int("What height do you want: "); //print the pyramid for (int h = 0; h < n; h++) It declares h (as an int) twice. Change one of them. Also, n hasn't ...
user avatar
  • 63.4k
1 vote
Accepted

Pset4 less comfortable compile error

In the pset we have several files, if you look closely at the specifications, there is a special file called makefile, and what we have to write to the compiler is: make filter
user avatar
  • 5,172
1 vote
Accepted

pset3 Resize - Invalid or unsupported Image Format

Have you actually looked at the raw hex data contained in the program's output files? Notice anything interesting? Where is the bmp signature that's supposed to be in the first 2 bytes? Next ...
user avatar
  • 63.4k
1 vote

pset4 speller all words are misspelled

Interesting. I ran a test using a small dictionary and noted immediately that the only words that were coming back as correct were the ones pointed to by the pointers in hashtable. Anything that wasn'...
user avatar
  • 63.4k
1 vote
Accepted

cs50 mario less comfortable eof error

What is "this" EOF error? Please provide more context so we know what you are talking about. If it is a failing check50 test case, the link check50 provides can often tell more. If not, specify how ...
user avatar
  • 20.7k
1 vote
Accepted

Multiple errors on pset4 resize, less comfortable

int npadding = (4 - (bi.biWidth * sizeof(RGBTRIPLE)) % 4) % 4; should use nbi, not bi. That's why n=1 and n=5 don't complain about the header, those values are always equal then. lineIterator is ...
user avatar
  • 20.7k
1 vote
Accepted

Pset 4: Resize (Less) Hint needed

The problems start here: the code modifies bi.biWidth and bi.biHeight for the output file and then uses them to control the processing of the input file. Say that n=2. That means that its going to ...
user avatar
  • 63.4k
1 vote

pset 2 initials (less); "expected prompt for input, not output of..."

Check the usage section of the initals page here: http://docs.cs50.net/problems/initials/less/initials.html Although your solution may be more user friendly, the problem does not expect you to ...
user avatar
1 vote

CS50 : pset4 resize(less comfortable)

The specification says to determine what header fields need to be updated. There are fields in the headers other than biWidth and biHeight that must be modified when n != 1. I don't see any code to ...
user avatar
  • 63.4k
1 vote
Accepted

I can't seem to figure out what is wrong with my code. Please help!

The headers of the new image have biSizeImage and bfSize values of the original.
user avatar
1 vote
Accepted

pset3 find less comfortable helpers.c didn't found the needle!

Use while (left <= right) to loop as long as the search interval has elements. No need for break;. You compare value value to index middle, but you have to compare value value to middle value ...
user avatar
  • 20.7k
1 vote

PSET4 Resize (Less)

Please access argv[1] only after you have verified that argc>1, otherwise atoi dereferences arbitrary value, and you might get random segfaults if calling the programme without arguments. How do ...
user avatar
  • 20.7k
1 vote

Built mario's pyramid but can't get pass the check50

Your output has an extra space in every row. The bottom should be flush against the left side.
user avatar

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