Search:

Type: Posts; User: strakerc

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    3,649

    Wow I'm blind; I swapped where 0 and 1 should be.

    Wow I'm blind; I swapped where 0 and 1 should be.
  2. Replies
    7
    Views
    3,649

    I'm in school, and this was the assignment; so I...

    I'm in school, and this was the assignment; so I cannot change the data structure. Here is my code which may also help make more sense of things. I think it is close to being right, but some...
  3. Replies
    7
    Views
    3,649

    That's close, but the data structure isn't a...

    That's close, but the data structure isn't a normal 2D array and cannot be accessed like array[][]. It is two separate arrays of linked lists...I uploaded a picture to help explain what I mean. The...
  4. Replies
    7
    Views
    3,649

    Detecting symmetry in sparse matrix

    So I need to detect symmetry between 2 arrays of linked lists. One array represents rows in a sparse matrix (a table where empty values do not exist and thus do not waste space) and the other...
  5. Replies
    3
    Views
    2,388

    I have completely rewritten my insert function,...

    I have completely rewritten my insert function, which has removed all bus errors. I now however cannot tell if either my print function is wrong, or the insert function isnt completely right as...
  6. Replies
    3
    Views
    2,388

    Do you mean node*? Yea I think you're right....

    Do you mean node*? Yea I think you're right. Additionally I think I needed to malloc for the Matrix. I am getting the same bus error for invalid memory access all over the place...

    Here is my main...
  7. Replies
    3
    Views
    2,388

    Initializing a Sparse Matrix

    Hi all, so I'm trying to initialize 2 arrays of nodes as defined like:


    struct Node
    {
    long rowIndex;
    long columnIndex;
    double value;
    struct Node* rowPtr;
    struct Node*...
  8. Replies
    11
    Views
    3,053

    Thanks. All you help got this working....

    Thanks. All you help got this working. Additionally, I needed () around *array.
  9. Replies
    11
    Views
    3,053

    I do catch the realloc failing, but I am still...

    I do catch the realloc failing, but I am still receiving "bus error". See my above post. Also, shouldn't I free the original array regardless and set it equal to resizedarray?
  10. Replies
    11
    Views
    3,053

    That makes sense, although for some reason I...

    That makes sense, although for some reason I thought you were not allowed to just set an array equal to another: should I add free(original_array); ? Regardless, I did these suggestions and it...
  11. Replies
    11
    Views
    3,053

    I see. The loop was a simple mistake and...

    I see. The loop was a simple mistake and understood. As for realloc, do this mean I need to declare a new char ** and set the realloc equal to it, ie
    char ** resizedarray;
    resizedarray =...
  12. Replies
    11
    Views
    3,053

    Loading a file of words into dynamic char**

    My goal is to load a char** from a file of words so that there is no wasted space (ie custom amount of cols for the exact amount of letters in each word). I am getting "bus error" when trying to run...
Results 1 to 12 of 12