Recent content by cubanmissile

  1. C

    C Programming: Creating recursive quickSort function

    Actually, it was my sort function that was causing the quickSort to not work. :) Thank you guys very much for the help! Programming is fun (not sarcasm, I truly love programming)!
  2. C

    C Programming: Creating recursive quickSort function

    Homework Statement Function: void quickSort(struct student *array, int start, int end) { int i = start; int j = end; while(i < j) { // Move left counter, then right counter. while(i <= end && array[i].numDays <= array[start].numDays) i++; while(array[j].numDays >...
  3. C

    C Programming: freeing array of structs causes heap overflow

    To answer your points, which are ALL valid and I hope others read this! 1. I did account for null character, assignment says name can be as long as 29 characters (guaranteed) so NAMELENGTH is 30. 2. You are CORRECT! I was calling my sort array using the end index as "students" instead of...
  4. C

    C Programming: freeing array of structs causes heap overflow

    Wouldn't that call an error when trying to write said index? I'll check that out, you bring up a valid point, thank you! :) EDIT: You are correct! For some odd reason my sorting function is calling the swap function with an index too big! I didn't think of checking it, that means my sorting...
  5. C

    C Programming: freeing array of structs causes heap overflow

    Homework Statement Error: warning: HEAP[Happy Birthday.exe]: warning: Heap block at 006E15A8 modified at 006E1688 past requested size of d8 My Struct: struct student { // Defines a student. char firstName[NAMELENGTH], lastName[NAMELENGTH]; int day, month, year; }; My Code...
Back
Top