Recent content by trilobyte

  1. T

    Unix and Pipes

    Yeah, but how can I use that double array when closing the file descriptors? like: close(pipes[1][0]); gives me a "cannot dereference non-pointer type" when I try to compile.
  2. T

    Unix and Pipes

    Having a little issue with pipes Pipes need their own file descriptor array right? IE: int fd[2]; pipe(fd); ...if I wanted 2 pipes.... int fd0[2], fd1[2]; pipe(fd0); pipe(fd1); ...now my question. If I wanted to make 100 pipes, is there a way to write a loop that will create 100...
  3. T

    Albatron PX845PEV PRO Thermal Readout problems

    Thanks for the link. I'll check it out. Same LED problem? I'm glad I'm not the only one. What case you have?
  4. T

    Albatron PX845PEV PRO Thermal Readout problems

    I'm not quite sure what sensors I should use on MBM...anyone know? Also, I notice that in the BIOS it says my CPU AND SYSTEM temps are almost 100F :0 Now, not sure about the CPU, but I know for a fact my system temp should be around 75-80F. Anyone else having trouble? Anyone know any solutions...
  5. T

    Binary Tree help needed

    Wow, thanks a bunch guys (especially to m0ti and ReelC00L). The algo seems to work when I threw it in a test program. I guess my problem is just trying to trace it down and break it apart. I'm not very experienced with recursion, so it's a pain for me to figure out binary tree algo's (i'm still...
  6. T

    Binary Tree help needed

    so what would the total recursive funtion look like and how would it work? I'm having a hard time picturing this in my head.
  7. T

    Binary Tree help needed

    bump and *sigh* :)
  8. T

    Binary Tree help needed

    ^^ isn't that what I was doing w/ longest path?
  9. T

    Binary Tree help needed

    I can't figure out how those algos apply to my tree :/ normally I'd do this to find the longest root-to-leaf path: int long(nodePtr ptr) { if(ptr == NULL) return 0; else { return 1+ max(long(ptr->left), long(ptr->right)); } } where max returns the biggest of the 2 parameters Now, for...
  10. T

    Binary Tree help needed

    I know how to find the longest root-to-leaf path in the tree, however I don't know how to find a tree's shortest-root-to-leaf path. I'm having problems plugging down the recursive algorithm for this. I have a feeling my upcomming exam will have something like this, so any quick help in...
  11. T

    gets() in a void function -- C help

    Ah I think I got it now. I wasn't flushing the buffer properly after past keyboard inputs from other function calls ;)
  12. T

    gets() in a void function -- C help

    hrm, apparently it's something in my switch statement...oh well thanks anyway. gunna have to track this bug down
  13. T

    gets() in a void function -- C help

    exactly, that doesn't work on the printf in the do function, it'll just give me an extra line. it won't let me input any text. *edit: ok...wtf. that little program you posted works...but in function in this program i'm writing...it doesn't...hrm...i'm going to have to really look now...
  14. T

    gets() in a void function -- C help

    How come gets() works in my main, but if I call it in a void function (example: void change(char * string) ) it won't let me input from the keyboard? lets say I have this *psuedo-code btw void change(char * string) { gets(string); } now gets(string) SHOULD give me a keyboard-input prompt...