Search:

Type: Posts; User: MSZShadow

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,349

    I don't know what kind of tools I have at my...

    I don't know what kind of tools I have at my disposal in the TopCoder arena, really. My professor has a driver program, but whenever I try to compile the whole program, the compiler complains about...
  2. Replies
    10
    Views
    1,349

    Yeah. I'm not responsible for the main program,...

    Yeah. I'm not responsible for the main program, which obtains those values.

    I'll add some sample data, in the event someone tries to check my logic:

    Sample values can look something like this:...
  3. Replies
    2
    Views
    1,389

    I haven't used switch-case statements in a while...

    I haven't used switch-case statements in a while (because my classes decided to drag me through C and assembly for two semesters), but I'm pretty sure it'd be easier to take your input as an integer,...
  4. Replies
    10
    Views
    1,349

    Yeah, I realize that. For clarity, I ran that...

    Yeah, I realize that.

    For clarity, I ran that code with the same set of input while changing that statement to see when it would stop causing a seg fault. Nothing else in the code changed.
    ...
  5. Replies
    10
    Views
    1,349

    I know that. But assuming curBall exists, the...

    I know that. But assuming curBall exists, the boolean expression curBall->high != NULL shouldn't cause a seg fault, right...? After all, you're testing to see if curBall->high exists.

    Edit: If you...
  6. Replies
    10
    Views
    1,349

    A seg fault. Gotta love those.

    So, I'm having issues with a certain seg fault. I don't really understand what's causing it.
    I can perform the following operations with curBall, which is class Ball* type.

    curBall->val
    curBall...
  7. Replies
    12
    Views
    6,705

    I'll look into those. Thanks.

    I'll look into those. Thanks.
  8. Replies
    12
    Views
    6,705

    As part of the process for narrowing down where...

    As part of the process for narrowing down where the error was, I placed a cout statement on the line immediately before the line where I attempted to use curSong. It seg faulted before it printed the...
  9. Replies
    12
    Views
    6,705

    That...would be a good idea, yeah. Actually,...

    That...would be a good idea, yeah.

    Actually, my compiler never gave me that warning.

    However, it actually seg faults before it ever tries to use curSong.
  10. Replies
    12
    Views
    6,705

    Can't solve a certain seg fault.

    I'm currently writing part of a lab program for a data structures class I'm taking. I'm only partway into the lab, so there's not much written at the moment.

    First, let me apologize in advance....
  11. Replies
    6
    Views
    978

    Ohh. -facepalm- I'll change it to access the...

    Ohh. -facepalm-
    I'll change it to access the bits in the opposite order, then. (0-7)
    And let's see what happens...

    EDIT: Alright, now the output for that number is

    25.812500
    0 | 10000011 |...
  12. Replies
    6
    Views
    978

    25.812500 1 | 00000100 | 11100110000000100000000...

    25.812500
    1 | 00000100 | 11100110000000100000000

    That's the current output I'm getting. The last times I continuously ran it, though, the binary output would change occasionally.

    Even with...
  13. Replies
    6
    Views
    978

    Unless I'm going crazy, I'm pretty sure I have it...

    Unless I'm going crazy, I'm pretty sure I have it set to run through bits 7-0 (8th-1st) of each element in the array.
    Notice later on, I decrement h by one, until it's less than 0, when I set it...
  14. Replies
    6
    Views
    978

    Comp Organization lab confusing me. :C

    Trying to do a lab in a Computer Organization class using C. The goal of this part is to make a character array representation of how a given float looks to a computer. I wasn't given much...
  15. Replies
    5
    Views
    2,114

    Thanks guys. The error was fixed by changing the...

    Thanks guys. The error was fixed by changing the bugged line to

    if(tree->root == NULL)

    After that, there were a small number of logic errors in my main program, which I fixed. Now it's working...
  16. Replies
    5
    Views
    2,114

    Yeah, but I'm not too good at using gdb yet. I...

    Yeah, but I'm not too good at using gdb yet. I managed to use it to trace the error back to that point, but can't get much more out of it. I'll go try again.

    Edit: It's giving me different...
  17. Replies
    5
    Views
    2,114

    Strange Error (Learning Bstrees)

    Hey, I'm trying to write a program using binary search trees. Everything seems to work up to a certain point, which (as far as I know) shouldn't produce an error. It segmentation faults while it's...
Results 1 to 17 of 17