Search:

Type: Posts; User: mgracecar

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    5,381

    Find all subsets with sum of x

    Hello,

    I am working on a homework lab in which we have to find all the subsets equal to a given sum from an array of numbers.

    For example, an array of 7 numbers (1, 3, 4, 6, 7, 10, 25) with a...
  2. Replies
    7
    Views
    3,197

    Red-Black tree ranking question

    Hello all, so I am doing an assignment that requires me to insert new keys into a Red-Black tree. During this my professor wants us to also update the "odd subtree root ranks" of each node.

    The...
  3. Replies
    27
    Views
    2,791

    No problem. It's partially my fault. I had about...

    No problem. It's partially my fault. I had about a week and a half to do it, but I inconveniently got sick for a few days, had work, and a few personal matters to take care of. It happens. I have a...
  4. Replies
    27
    Views
    2,791

    Thanks for your help everyone. So I haven't coded...

    Thanks for your help everyone. So I haven't coded in C in a little over a year now, so the code may not look the best.

    Here is the code I came up with though....[C] #include <stdio.h> #include...
  5. Replies
    27
    Views
    2,791

    Ahhh excellent points by all of you. My T.A....

    Ahhh excellent points by all of you. My T.A. hasn't gotten back to me and I have been at work all day so I am just now getting back to this. I will continue to work on it tonight. I see what you guys...
  6. Replies
    27
    Views
    2,791

    I'm using Dev C personally. I believe the...

    I'm using Dev C personally. I believe the professor is going to be testing it on SSH.

    And @rcgldr, thank you for that last post. It didn't even cross my mind on how accurate the degree needed to...
  7. Replies
    27
    Views
    2,791

    Thanks for the advice rcgldr. However, I forgot...

    Thanks for the advice rcgldr. However, I forgot to mention that in class he said he forgot to take that off and does not want us to use arctangent or atan2(). I appreciate the idea though. If all...
  8. Replies
    27
    Views
    2,791

    Conceptual question

    Hello everyone :),

    I'm not really asking a coding question, but more of a concept question for my homework that is baffling me right now.

    I will explain it below, but a direct link to my...
  9. Replies
    4
    Views
    1,308

    Works perfectly. Thanks a lot for your help. ;)

    Works perfectly.
    Thanks a lot for your help. ;)
  10. Replies
    4
    Views
    1,308

    Well actually I tried the function without the...

    Well actually I tried the function without the parameter and it was working. I just added the parameter because I realized I need to use it to know how many spots there are in the structure. And...
  11. Replies
    4
    Views
    1,308

    issue with point to array.

    My function is this....

    struct names *open_classes_taken(int *name_count, int *class_count[]);

    it returns a structure for me. And it uses an integer that i'll need later which is the first...
  12. Replies
    6
    Views
    3,858

    Last post on this topic hopefully. I think I...

    Last post on this topic hopefully.
    I think I fixed it.

    Check this out.


    struct names{ char name[20][20];
    };
  13. Replies
    6
    Views
    3,858

    still messing around with it.... but so far this...

    still messing around with it....
    but so far this is what I have...


    struct names *all = malloc(sizeof(struct names));


    if ( (fp = fopen("hw11-data.csv", "r" )) == NULL )
    ...
  14. Replies
    6
    Views
    3,858

    Ok, I'm trying this way.. struct names{ ...

    Ok, I'm trying this way..


    struct names{ char name[20];
    };


    struct names **all = malloc(sizeof(struct names*));

    if ( (fp = fopen("hw11-data.csv", "r" )) == NULL )
  15. Replies
    6
    Views
    3,858

    yessir, and that was my next idea. But I wasn't...

    yessir, and that was my next idea. But I wasn't sure how I'd implement that. As in, how would I know it's the new line?

    for example my function for this piece of code for this so far is this...
    ...
  16. Replies
    6
    Views
    3,858

    2d array of strings?

    Hi,
    I have an assignment in which one of the requirements is to read a file which has a person's name as well as their classes they have taken.

    such as

    Jerry,CSE1320,CSE1310...
  17. Replies
    4
    Views
    1,061

    alright I'm going to fool around with it some...

    alright I'm going to fool around with it some more. Thanks for the help
  18. Replies
    4
    Views
    1,061

    ahh, i never thought of the loop that way. Much...

    ahh, i never thought of the loop that way. Much easier than what I was trying to do. So I no longer need my if-else statements either.
    Quick question though...Why does the realloc need to be inside...
  19. Replies
    4
    Views
    1,061

    finding the end of a line of a file.

    I'm reading in a file line by line. Each line has a name, and a random number of classes.

    for example

    Jerry,CSE1310,CSE1320,CSE1325
    Bob,CSE1105,CSE1310
    Barry,CSE1104,CSE1105,CSE1310,CSE1320
    ...
  20. Replies
    4
    Views
    1,190

    Sorry about that. I just posted what I changed in...

    Sorry about that. I just posted what I changed in the other one. I didn't mean to offend anyone. I won't post the new thread for the same problem either.

    And as for Salem...
    I'm not sure on...
  21. Replies
    4
    Views
    956

    Sorry about that. Someone else got onto me as...

    Sorry about that. Someone else got onto me as well for making 2 different posts.

    Anyways for this one...

    I was right about the add_and_balance function

    I changed it to this..


    root =...
  22. Replies
    4
    Views
    1,190

    Binary tree question

    I've been working on this for many hours now. Maybe a good night of rest will help clear my head and help me out.
    But I'm going to post this here tonight in hope to see something tomorrow that can...
  23. Replies
    4
    Views
    956

    I fixed it. Useless post Haha

    I fixed it. Useless post Haha
  24. Replies
    4
    Views
    956

    Edit You know what...I think I put in the actual...

    Edit
    You know what...I think I put in the actual numbers in the array for the function he had. I think he wanted to spot where of the first and last variable. I.E. (0 and Max_lines). Gonna see if...
  25. Replies
    4
    Views
    956

    confused on binary tree.

    My professor gave us an assignment to make a binary tree. We're given a file which we store in an array and then sort the numbers in the array least to greatest.
    I have done all of that so far...
    ...
Results 1 to 25 of 119
Page 1 of 5 1 2 3 4