Search:

Type: Posts; User: RaDeuX

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    7,452

    Oh wow you're right. When France comes up twice...

    Oh wow you're right. When France comes up twice it just leaves that extra node. Thanks for your help again tabstop. I really appreciate it.
  2. Replies
    6
    Views
    7,452

    Oh, I was a bit confused with what you said. ...

    Oh, I was a bit confused with what you said.

    Part of the issue was that I didn't give processListManager a return variable in main. Fixing it to
    list = processListManager(list); so that's that....
  3. Replies
    6
    Views
    7,452

    I commented out the free ( ...name) and free (...

    I commented out the free ( ...name) and free ( ...capital), but I'm still getting a memory leak error.
  4. Replies
    6
    Views
    7,452

    Unknown memory leak with linked lists...

    So my program is 99% towards completion. However, the program leaks memory. The deleteNode, deleteManager, and destroyList are the ones to blame, or so I think. When I delete a node other than the...
  5. Exactly my thought. However, when I use this...

    Exactly my thought. However, when I use this approach for some reason my new node does not come up at all.

    EDIT: Nevermind, for some reason it works fine now. Perhaps it's because I didn't give...
  6. My program isn't inserting a new node in the beginning of the list...

    Alright, so I basically have three options in the function insertManager. I can put the new node in the beginning, middle, or end. I was able to put it in the end without any problems, but when I try...
  7. Replies
    10
    Views
    1,679

    Found it. I completely forgot that stacks and...

    Found it. I completely forgot that stacks and heap are different. I removed the following code and made the appropriate changes.


    tempInt = createDynAry ( *numCountries );
    tempName =...
  8. Replies
    10
    Views
    1,679

    Well it's under the assumption that the user...

    Well it's under the assumption that the user correctly defines what they want. But anyway...

    It's just that structures makes it a little different. I'm okay with pointers but I'm not godlike at it.
  9. Replies
    10
    Views
    1,679

    As long as I free the memory in a while loop 'til...

    As long as I free the memory in a while loop 'til it hits NULL then I wouldn't need numCountries right? I'm not sure if releaseMemory is freeing the first level dynamically allocated pointers or the...
  10. Replies
    10
    Views
    1,679

    Okay, I fixed releaseMemory to be more NULL...

    Okay, I fixed releaseMemory to be more NULL friendly.


    void releaseMemory ( COUNTRY *list )
    {
    // Local Declarations
    int i;

    // Statements
    i = 0;
  11. Replies
    10
    Views
    1,679

    I just put in 21 to see whether or not I freed...

    I just put in 21 to see whether or not I freed the memory correctly. 21 is numCountries -1. The list's variables carry pointers to tempInt, tempName, tempCap, and tempPop. I also don't like using...
  12. Replies
    10
    Views
    1,679

    Country List Menu L - list the countries in ID...

    Country List Menu
    L - list the countries in ID sequence
    P - list the countries by population in descending order
    S - Search by ID
    C - Search by capital
    Q - Quit the program

    Please enter an...
  13. Replies
    10
    Views
    1,679

    For some reason I end up with memory leak...

    I'm not sure how I'm freeing the memory incorrectly. I freed all the memory in each string until null, but it won't let me free the next level of pointers.....




    ...
  14. Replies
    17
    Views
    1,736

    I didn't know '/n' counted as a character as...

    I didn't know '/n' counted as a character as well, which was part of the reason why I didn't have that extra character space. Thanks for your input, there are no more memory leaks now.
  15. Replies
    17
    Views
    1,736

    Here's the updated version: #include...

    Here's the updated version:


    #include <stdio.h>
    #include <stdlib.h>
    #include <crtdbg.h>
    #define FILE_IN "countries.txt" // user is free to change filename

    // Prototype Declarations
    char...
  16. Replies
    17
    Views
    1,736

    That causes the same debug error. It tells me...

    That causes the same debug error. It tells me that its detected a heap corruption.
  17. Replies
    17
    Views
    1,736

    No I don't. i is 13 after the for loop ends.

    No I don't. i is 13 after the for loop ends.
  18. Replies
    17
    Views
    1,736

    That's not the point. The 13 is temporary. What...

    That's not the point. The 13 is temporary. What I'm trying to fix is the memory leak, not the functionality of the program.
  19. Replies
    17
    Views
    1,736

    The last country is a null pointer. Our teacher...

    The last country is a null pointer. Our teacher wants us to put a null pointer at the end of any array of pointers. I just put the numbers there assuming that the parameters would pass the value of...
  20. Replies
    17
    Views
    1,736

    My compiler gives me a heap stack error when I...

    My compiler gives me a heap stack error when I run that.
  21. Replies
    17
    Views
    1,736

    Memory leak issues! Please help! >_

    For some reason I'm getting a memory leak error. It's probably from the part where I start to copy the strings and allocate an array of characters, but I have no idea why. I'm using a text file for...
Results 1 to 21 of 21