The answer is in the link below
http://dsnra.jpl.nasa.gov/pkg/timer-1.0/src/timer.c
Type: Posts; User: nkhambal
The answer is in the link below
http://dsnra.jpl.nasa.gov/pkg/timer-1.0/src/timer.c
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...
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;
}...
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...
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...
thanks. appreciate it.
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."....
How about this.?
I think this is what I was intending to do.
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
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...
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...
Check the link below
select()--Synchronous I/O Multiplexing
Does the file have read privilege? Do you own the file? Try giving the full path instead of just filename.
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...
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...
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...
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...
change this
sscanf(line, "%f", x[0]);
to
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.
I have following program which won't complie. Can someone help locate the problem here ?
#include <stdio.h>
#define max 10
struct a
{
sorry..
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...
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. ...
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...
its looks like a C code. why are u compiling it with C++ complier ?
Use gcc.
8 bytes ?? (Assuming its a 32 bit computer and int means (long) )