Timeline for Pset5 Speller - Weird Load Function Bug (Edited w/ Code)
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 10, 2023 at 15:47 | history | edited | UpAndAdam |
edited tags
|
|
Oct 6, 2023 at 15:13 | comment | added | UpAndAdam | valgrind or your compiler should also be complaining about your use of defined values in the area Cliff points out below. a good LINT tool or Compiler would absolutely detect that, but in practice I've often had to find them myself. Best practice is to always make sure your variables are initialized/assigned to before you read from them whether they are pointers or not. | |
Oct 6, 2023 at 1:30 | comment | added | Poptart | Hi UpAndAdam, I misspoke in saying no data has been loaded prior to this. I meant that in this iteration of the loop, the specific scanned string has not yet been loaded into the table. At this point in the program, about 58,000 other pieces of data have already been loaded into the table with no issue. For the string variable, I'm using it because that's what was suggested in the specifications, and I didn't know you could scan directly into n->word. I had been using string as a buffer to ensure that the data wasn't lost along the way. I am still troubleshooting valgrind leaks :) | |
Oct 5, 2023 at 16:05 | answer | added | Cliff B | timeline score: 1 | |
Oct 5, 2023 at 14:59 | comment | added | UpAndAdam | what do you mean by "replace 'a' where it existed in its linked list on the hash table before any days is actualy allocated into a linked list" if no data is allocated into the linked list then how is a there? do you mean before that word is put into the linked list? Are you checking that n is succeeding in it malloc calls? Also why bother with the string variable instead of just reading directly into n->word with the pattern you are using? Just wasting time on a strcopy. how is your node defined? also you are leaking memory on your return false cases. | |
Oct 5, 2023 at 14:43 | comment | added | UpAndAdam | thank you taking a look | |
Oct 5, 2023 at 12:59 | history | edited | Poptart | CC BY-SA 4.0 |
added 1331 characters in body; edited title
|
Oct 4, 2023 at 21:00 | comment | added | UpAndAdam | post your code here not images of your code | |
Oct 4, 2023 at 20:10 | history | edited | Poptart | CC BY-SA 4.0 |
added 140 characters in body
|
S Oct 4, 2023 at 19:58 | review | First questions | |||
Oct 6, 2023 at 0:45 | |||||
S Oct 4, 2023 at 19:58 | history | asked | Poptart | CC BY-SA 4.0 |