May I recommend data structures (hash tables, trees, lists, etc.) and algorithms (sorting, searching, etc)....seems like the next logical step.
Type: Posts; User: matrixx333
May I recommend data structures (hash tables, trees, lists, etc.) and algorithms (sorting, searching, etc)....seems like the next logical step.
@rrlangly
Have you read this:
inet_ntop(), inet_pton()
I went through the code and it's working on my Fedora 14 box.
Sounds like you need non-blocking sockets:
Blocking vs. non-blocking sockets
Slightly Advanced Techniques
Hope this helps!
I've never used code::blocks before, but I did a Google search and found this:
Project --> Set programs arguments?
I disagree with this advice as both gets() and scanf() are insecure functions. Prelude had the best advice in my opinion.
Not sure if you've seen this thread yet, but it may provide some help:
ioctl request to get the HW address
Glad I could help!
Again, I would recommend checking the return value of malloc() to make sure you don't run out of memory and also remember to free your malloc'ed memory when your done using it....
Well, if your not sure why the astrix fixed it, then I haven't helped you.
What was the index of source.label[] looking for? And what were you giving it?
What did the astrix do when you used it...
When these kinds of problems happen, I like to write small programs to try and figure out why the issue is happening. For instance:
#include <stdio.h>
#include <string.h>
struct display{
...
Hey everyone,
Found these videos on youtube that I thought everyone would be interested in seeing. It was a 48-hour game development challenge and the entries were recorded in time-lapse.
...
Just a small note, you forgot to free(out_file) in main.....
;)
Now I feel bad for giving you the code instead of encouraging you to figure it out. It's important that you understand how the code works, not just to "use it".
You could also implement some code to display your values in binary:
#include <stdio.h>
#include <string.h>
int main(void) {
const char *hex = "2b";
int i = 0, j = 0;
...
Someone please correct me if I'm wrong, but I see a couple of problems here.
First, rand() and srand() are functions defined in stdlib.h. Are you trying to implement your own versions of these...
Depending on your environment, I think you need an API similar to ncurses:
NCURSES Programming HOWTO
Thanks Bayint Naung,
I edited my previous post at the same time you replied. That seems to have done it. Thanks again!
I programmed it statically so the calling function always passes either 'd' or 'e'.
Examples:
fin = openfile(filename, 'd');
fout = openfile(filename, 'e');
EDIT: I updated the...
I wrote a wrapper function to either read or write to a file stream based on the 'flag' argument passed to the function:
FILE *openfile(char *filename, char flag) {
FILE *fin = NULL, *fout =...
Also another good habit to get into early:
FAQ > What's the difference between... > main() / void main() / int main() / int main(void) / int main(int argc, char *argv[])
Basically, you...
TY to everyone for the help...gil_johnson found the bug. When I originally copied the code over to my Intel netbook....I noticed the same problem gil did when I ran the program. I changed the code...
WOW! Excellent call Adak!
I took your advise and before doing in-depth research on my mobo and processor I copied the program over to my Intel Atom Netbook......and the function worked perfectly!...
TY for the reply gil,
There must be a problem. I did as you suggested and I'm still arriving at 0.000000. I even changed my printf() statement to show twenty 0's after the decimal point:
...
Here are both of the files:
TY for the help Bayint Naung, but unfortunately when using setvbuf() I am still getting the same result. I placed the function after the stream has been opened but before any operation has been done...
The code is 400+ lines. But I'm not sure that's the problem. From my understanding of clock(), it returns the processor cpu time. The cpu has to do some work, so I'd expect to get something other...