This is a discussion on declare function inside fork() within the C Programming forums, part of the General Programming Boards category; Originally Posted by master5001 It means you are doing something like: [blah] Absolutely not my friend. Here is the exact ...
sprintf(messg,"Can't unlink %s",sckt);
Last edited by master5001; 10-11-2008 at 02:30 PM.
Careful on those, MK27. Its a mistake all of us can easily make. Remember that printf() works with the output buffer. sprint() is the one that prints to strings.
Last edited by master5001; 10-11-2008 at 02:29 PM.
Even at that, I would recommend using snprintf(). Which helps prevent buffer overflows.
Remember, only you can prevent buffer overflows.
Does this mean I am a prisoner of GNU forever?Code:Function: int sprintf (char *s, const char *template, ...) This is like printf, except that the output is stored in the character array s instead of written to a stream. A null character is written to mark the end of the string.
MK27 can you post a compilable snippet?
Of your sprintf problem.
Not at all. sprintf() is a C standard function. strcasestr() on the otherhand is a GNU extention. I use it anyway... Microsoft provides a lot of functions similar to the GNU extentions that one can simply #define as the GNU names of the functions. I know that is not your issue, MK27. But there are a lot of M$ folks floating around.Originally Posted by MK27
Can you post an example of code that gives you that error reguardless? Por favor.
Hey, are you trying to pass a socket as a string? That would issue a warning too. Though typically it would not be this specific warning.[/edit]
Last edited by master5001; 10-11-2008 at 02:31 PM.
And how are content, fthis and found declared?
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.