Thanks for the pointers, this code now works. My question is what should I do if the malloc were to fail when adding a new node? Free up the list? Return the list without adding the new node? If I...
Type: Posts; User: tar
Thanks for the pointers, this code now works. My question is what should I do if the malloc were to fail when adding a new node? Free up the list? Return the list without adding the new node? If I...
I am having trouble with the code below, for some reason there are no recipients in my linked list. I think it's a pointer problem. Also in my rcpt_add function is it best to return the head of the...
argh it's been a rough day, thanks for the help.
Thanks for the pointers dwks, now why can't I compile this? Isn't it the same thing?
#include <stdio.h>
void testfun(char *buffer);
int main(int argc, char **argv) {
char buf[2];...
What's wrong with this code? I am trying to use gcc to compile.
#include <stdio.h>
void testfun(buffer) {
printf("%s\n", buffer);
}
int main(int argc char **argv) {
Okay I will try that, thanks.
Yes it does do something, it inserts 1 node.
I should add that it seg faults when I try to print the tree and this is due to root being NULL after the inserts, which it should not be. What am I doing wrong that is causing root to be NULL after...
I am getting a segmentation fault when I run this code and I know why, root is NULL in main but I don't know why it is null. Any suggestions? Thanks
//proc.c
#include <stdio.h>
#include...
With the code below I am trying to send "AT\r" to the modem and I am expecting "OK\r" back but I am not getting it, I am getting "AT\r" back. Any ideas or pointers? Also I know I am opening the...
I know about google. I was just looking for some suggestions on what would be the best way to approach this problem.
I am developing a C program that runs on FreeBSD. I need to be able to display image data in X Windows and I am looking for a simple way to do this. I don't need any kind of image format decoders, I...