New answers tagged

1

The bug is in your unload function. You return after cleaning up just 1 list. But you have 26 of them to get through. The outer loop is also out of bounds. You iterate up to N + 1 for some reason. // Unloads dictionary from memory, returning true if successful, else false bool unload(void) { for (int i = 0; i < (N + 1); i++) // Out of bounds. Should ...


0

I'm sorry, but this code is not passing valgrind. ~/go/test/pset5/ $ valgrind ./speller small ==223== Memcheck, a memory error detector ==223== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==223== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==223== Command: ./speller small ==223== MISSPELLED WORDS WORDS MISSPELLED:...


0

int sepiaRed = round((0.393 * image[h][w].rgbtRed) + (0.769 * image[h][w].rgbtGreen) + (0.189 * image[h][w].rgbtBlue)); int sepiaGreen = round((0.349 * image[h][w].rgbtRed) + (0.686 * image[h][w].rgbtGreen) + (0.168 * image[h][w].rgbtBlue)); int sepiaBlue = round((0.272 * image[h][w].rgbtRed) + (0.534 * image[h][w].rgbtGreen) + (0.131 * image[h][w].rgbtBlue))...


Top 50 recent answers are included