Where would you have it point as a sensible default? Bear in mind that "sensible" needs to cover everything from writing C on a super computer,...
The last code you posted is broken, does that answer your question?
Sure, there's no problem with reassigning the pointer to point somewhere else, with p = &x; The real problem with your code is that at *p = 10,...
You should use strtol() all the time. atoi() for example cannot detect numeric overflow.
You write it as C++, and supply a default constructor function. Or if you're stuck with C, then your approach is one of several roughly equal...
By being included first is how it checks.
By making sure that foo.h includes gromit.h and widget.h automatically, you save having to explain to all users of foo.h the need to include the...
Perhaps if you'd read this http://www.go4expert.com/faq.php?faq=guidelines or even bothered to press "preview post", you would have noticed that...
In that case, I've no idea what your question is.
It's wrong because you did this *ptr = 10; before you did this ptr = somewhere; You can't just declare a pointer and magically hope it...
> i.e. use ++i or --i in place of i++ or i--. In the context of a for loop, where you're just using the operator for it's side effect, I've never...
> Are you saying that it's a security issue? > How? Because it has no means of detecting or representing numeric overflow (according to it's...
So what does this produce for you? #include <stdio.h> #include <time.h> int main() { time_t now = time(NULL); struct tm tnow =...
http://www.catb.org/~esr/faqs/smart-questions.html#urgent > Please explain your answers Please explain your lack of an attempt at the...
http://www.hmug.org/man/3/strftime.php http://www.hmug.org/man/3/ctime.php gmtime(), localtime(), strftime() would seem to be functions worth a...
Sample code of what?
> Can the atoi() function be used safely. No. > If not can anyother function which is not having this problem strtol() is the only safe...
> because i dont know in which platform the final application will be run And neither do the applications you've looked at. You don't just...
They do it by having something like #ifdef WIN32 int myTime ( void ) { int result = ftime(); // or whatever return result; } #elif...
http://curl.haxx.se/libcurl/ This has support for FTP and HTTP.
Separate names with a comma.