When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
13 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
Can't tell unless you post the rest of the code mentioned by valgrind
which part?
append_linked_list() and infix_to_postfix()
Also the type definitions for the ones used there, at least Stack
Valgrind is pretty good, either you're passing in the wrong size t, or someone you're not actually saving the malloced ptr into data. I'd suggest refactoring the code to safe the pointer to a temporary first out side of the if statement.
Essentially expand out the entire expression onto seperate lines untill you can see exactly what it's not happy with
I fixed it it had nothing to do with the push function
it was basically happening when I was popping an element, i wasnt freeing the memory for that popped element
ty for the help anyways
@minor hill Has your question been resolved? If so, run !solved :)
!solved
Thank you and let us know if you have any more questions!