> Is there a list of ways to make sure that you are doing the correct thing when it comes
> to writing C/C++ i.e as the above points out, or is it just trial and error.You can figure
> out the simple thing about C/C++ but when it come to more complex stuff and learning bad habbits
> can be a pain and costly,anyone any idea on what book/website i might look at.
Take a look at strlcpy, or strncpy, personally I'd use
If you ever produce code that goes into production, and uses
strcpy() then you should be taken out, beat with a stick
For more information on teh strlcpy vs strncpy look at
Eben Moglen talking to Richard Stallman about free software: "I said
to him, `Richard, you know, you and I are the two guys who didn't
make any money out of this revolution.' And then I paid for the lunch,
because I knew he didn't have the money to pay for it .'"
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!