Search:

Type: Posts; User: nkhambal

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    3,895

    The answer is in the link below ...

    The answer is in the link below

    http://dsnra.jpl.nasa.gov/pkg/timer-1.0/src/timer.c
  2. Replies
    1
    Views
    3,895

    SIGALRM and timer

    Hi,

    Sorry for some open ended questions here. I am trying to write a code where I create a timer wheel and push different timers on it. The timer wheel contains the callback function and data...
  3. Replies
    4
    Views
    8,529

    You need to use array of pointers or...

    You need to use array of pointers or pointer-to-pointer to your struct, if you want to create multiple pointers to a give struct

    i.e.



    stuct tst{
    int iIndex;
    char *szMember;
    }...
  4. Thread: Small Help!

    by nkhambal
    Replies
    7
    Views
    1,573

    I can not use ncurse. And I do not have conio.h...

    I can not use ncurse. And I do not have conio.h on linux to use getch(). I have to use getchar() somehow. Is there a way to work it out without getch().

    The faq posted was using getch(). I can't...
  5. Thread: Small Help!

    by nkhambal
    Replies
    7
    Views
    1,573

    Small Help!

    I need to read in the Arrow Keys (up,down, left, right) from the keyboard. There are no standard ASCII values for these keys (atleast not that I am aware of). I am working on Linux OS. My keyboard...
  6. Replies
    8
    Views
    1,676

    thanks. appreciate it.

    thanks. appreciate it.
  7. Replies
    8
    Views
    1,676

    Thanks. that fixed it. Should have read the man...

    Thanks. that fixed it. Should have read the man pages for realloc before.



    This what I get from man page "If realloc() fails the original block is left untouched - it is not freed or moved."....
  8. Replies
    8
    Views
    1,676

    How about this.? I think this is what I was...

    How about this.?

    I think this is what I was intending to do.



    #include <stdio.h>
    #include <stdlib.h>
    #include <assert.h>
  9. Replies
    8
    Views
    1,676

    Need help with pointer to pointer

    Hello Folks,

    I have been out of touch with C for a while now. Forgettin some basics. Following code is a simulator of the part of the large code that I am planning to implement. Basically here...
  10. Replies
    0
    Views
    5,058

    timeout for recvfrom()

    Hi,

    I have to write a UDP client to send a request to the server. Sometimes server does not respond in time. I need to timeout recvfrom() after certain time (say 5 secs) and send another request...
  11. Replies
    4
    Views
    2,867

    Check the link below select()--Synchronous I/O...

    Check the link below

    select()--Synchronous I/O Multiplexing
  12. Replies
    5
    Views
    993

    Does the file have read privilege? Do you own the...

    Does the file have read privilege? Do you own the file? Try giving the full path instead of just filename.
  13. Replies
    5
    Views
    993

    Are you sure the file you are opening exists? Is...

    Are you sure the file you are opening exists? Is it in the current working directory?

    Always check the return value of fopen. If fopen fails, "file" will be NULL, and you are trying to...
  14. Replies
    2
    Views
    16,613

    Hi, I am setting fd_max when I am creating the...

    Hi,

    I am setting fd_max when I am creating the 2 sockets. Its iust that I have not shown it in the post. My apologies for that. BTW, my problem is solved now. I passed NULL instead of wait...
  15. Replies
    2
    Views
    16,613

    multiple UDP sockets with select()

    Hi,

    I have a server which opens 2 UDP sockets, say A and B. I am using socket A for just listening on "0.0.0.0" address. I want to receive broadcast packets on this. I have set this socket using...
  16. Replies
    3
    Views
    879

    If it exits then i guess it should be fine, cause...

    If it exits then i guess it should be fine, cause after program exits, the memory used by it , is anyway returned back to the OS. But i don't think you can always count on that.

    Nevertheless, its...
  17. Replies
    2
    Views
    1,120

    change this sscanf(line, "%f", x[0]); ...

    change this



    sscanf(line, "%f", x[0]);


    to
  18. Replies
    2
    Views
    735

    thanks, that was it. It was difficult to see it...

    thanks, that was it. It was difficult to see it as a part of big code. So i wrote a simple code in OP to simulate it.

    Thanks again.
  19. Replies
    2
    Views
    735

    Pointer trouble

    I have following program which won't complie. Can someone help locate the problem here ?




    #include <stdio.h>

    #define max 10
    struct a
    {
  20. Replies
    18
    Views
    2,199

    Pointer trouble.

    sorry..
  21. yeah, creating 2 separate sockets was my way out...

    yeah, creating 2 separate sockets was my way out of this problem. I thought may be someone else might have some better solution than that. I guess not. I have no choice but to go ahead with 2...
  22. Using a single socket for accept() as well as connect()?

    Hi,

    How can a single socket be used to accept() as well as to connect().? Is it possible and what is the best way to implement it? Any sample code would be helpful.

    Here is what I want to do. ...
  23. Replies
    13
    Views
    1,477

    Did you actually check the topics ? besides it...

    Did you actually check the topics ? besides it was just to give you the idea of what system programming in C means. Those are the topics you will probably be dealing with in when you are doing...
  24. Replies
    6
    Views
    1,712

    its looks like a C code. why are u compiling it...

    its looks like a C code. why are u compiling it with C++ complier ?

    Use gcc.
  25. Replies
    5
    Views
    1,080

    8 bytes ?? (Assuming its a 32 bit computer and...

    8 bytes ?? (Assuming its a 32 bit computer and int means (long) )
Results 1 to 25 of 134
Page 1 of 6 1 2 3 4