This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
Hi, I'm working on a network queue simulator. Although, I'm not really well versed or experienced in programming in C, I was able to get together the following code:
The problem I keep on getting is that sometimes the code works just fine (VERY RARELY) while other times, it works fine for few iterations of the on timer (ton) but stops short of completing. This is actually an assignment for a networking lab.
ANY kind of help is appreciated. Just any. Even if you point me in right direction, that'll be heaps good. Thanks!
As usual, you cannot expect people to read or understand unindented code. Please go back and indent the code correctly with spaces not tabs.
I tried running your code, but something went wrong with my use of log; it said it couldn’t find the function, even though I made sure to write #include <math.h>.
Try putting some debugging code in: lots of print statements.
Also divide that main() function; it looks too long to me.