Search:

Type: Posts; User: samps005

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    7,921

    I'm not looking for a different language to use,...

    I'm not looking for a different language to use, if I was I would just use Python. The thing is I've gotten so use to using the simple string operations in Python that now that I have to do some C...
  2. Replies
    8
    Views
    7,921

    better c string functions

    I was looking for a different string library to use then the standard c one, or maybe just some simple wrappers for some of the c string functions. I did some searches and came up with a few...
  3. Replies
    8
    Views
    5,773

    http://www.ecst.csuchico.edu/%7Ebeej/guide/net/

    http://www.ecst.csuchico.edu/%7Ebeej/guide/net/
  4. Replies
    5
    Views
    2,574

    when talking about algorithm complexity, you...

    when talking about algorithm complexity, you usually do not bother multiplying the complexity by constants.

    That program is O(1) because it takes a constant amount of time to do the calculation.
    ...
  5. Thread: broken pipe

    by samps005
    Replies
    1
    Views
    2,600

    I decided that it would probably help to have the...

    I decided that it would probably help to have the code, so I will attach it here.
  6. Thread: broken pipe

    by samps005
    Replies
    1
    Views
    2,600

    broken pipe

    I am not sure if this belongs here or in the C board.

    I have been writing a simple server program.
    When a user connects I create a new thread to handle the user.
    There is another program that is...
  7. Replies
    2
    Views
    1,028

    copying stucts

    what is the best way to make a copy of a stuct,
    so that they hold the same information, but are stored in
    seperate chunks of memory?
  8. Replies
    5
    Views
    13,506

    yeah, I need the file pointer most of my other...

    yeah, I need the file pointer most of my other code needs it. Does anyone else know of a function to get a file descriptor from a file pointer? Or maybe just another really simple way to lock a...
  9. Replies
    5
    Views
    13,506

    sorry, I did read the man page for it, I just...

    sorry, I did read the man page for it, I just didn't catch that is was asking for a file descriptor.

    is there anyway to get the file descriptor from the file pointer?
  10. Replies
    5
    Views
    13,506

    How to properly use flock()

    I am making a call to flock() and getting the error
    " warning: passing arg 1 of `flock' makes integer from pointer without a cast"
    when I try to compile. I am running FreeBSD and using gcc.


    ...
  11. Replies
    6
    Views
    1,976

    you could declare it like char argument[20]...

    you could declare it like
    char argument[20]
    then you could break up the argument string into two strings using strtok() or index(), check the man pages for more info on those. I try not to use...
  12. Replies
    6
    Views
    1,976

    this may not be the smartest way, but it will...

    this may not be the smartest way, but it will work
    I would guess that a variable will never start with a number,
    so just test to see if the first part of the variable is a number and if it is...
  13. Replies
    6
    Views
    3,957

    not sure if this is what your trying to do but...

    not sure if this is what your trying to do
    but If you just want to exit your thread at some time try


    pthread_exit(NULL);

    this will exit the thread but not the rest of the program.
    The NULL...
  14. Replies
    2
    Views
    2,530

    buf is declared like char buf[100]; I am...

    buf is declared like
    char buf[100];

    I am reading into it from a socket using recv()
  15. Replies
    2
    Views
    2,530

    seg fault with strcmp

    does anyone know of common reasons to get seg faults with strcmp

    I am reading a string of characters into a buffer, When I try to compare that buffer with the string "BYE" I get a seg. fault.
    I...
  16. Replies
    3
    Views
    2,933

    it is something like this, but of course without...

    it is something like this, but of course without the object stuff. This should at least give you the basic idea then you can write it in plan C.




    void printBFS(Node root)
    {

    Queue Q =...
  17. Replies
    3
    Views
    3,861

    as far as I know it is always left to right for...

    as far as I know it is always left to right for all infix notation
  18. Replies
    3
    Views
    4,926

    one sugestion I would have is that for simple...

    one sugestion I would have is that for simple program like that is to not us scanf. scanf can be tricky sometimes and if you just starting off you better off trying something else. if you want...
  19. Replies
    1
    Views
    5,450

    I do similar operations in matlab when dealing...

    I do similar operations in matlab when dealing with matrices. The simplest way to store a diagonal matrix is to just store the diagonal in a single dimension array. so every none zero element will...
  20. Replies
    3
    Views
    1,653

    thanks for your response. I was able to reduce...

    thanks for your response.
    I was able to reduce the operation time to about 10% of the original time by manualy unrolling the loops in steps of three for the middle loop and steps of 16 for the inner...
  21. Replies
    3
    Views
    1,653

    I'm using gcc and running on linux. pentium III

    I'm using gcc and running on linux. pentium III
  22. Replies
    3
    Views
    1,653

    Matrix Multiplication

    I'm writting some functions that need to multiply large matrices together. This is what I have so far for it. It works fine, but it runs to slow. I need to run this function a lot so it needs to...
  23. Thread: Debugging

    by samps005
    Replies
    1
    Views
    913

    Debugging

    Does anyone know of debugging programs like gdb, but more visual. I'd like to keep track of several things at once and I was just wondering if there is a way to do this without having to ask again...
  24. Replies
    7
    Views
    3,263

    Logical negation

    does anyone know of another way to write !(x)
    x being a 32 bit int.
  25. Replies
    5
    Views
    7,999

    thanks, I wasn't really expected some one to just...

    thanks, I wasn't really expected some one to just give me the code. I don't completly understand how the masking is working, but I'll have to break it down at it and figure it out.
Results 1 to 25 of 27
Page 1 of 2 1 2