Tutorial seven on pointers and C strings published

The tutorials from About.com continue with the 7th one (of about 30) published. This is about C strings which are really just pointers to an array of characters. Once you understand pointers strings are easy enough to understand.
C is not a great programming language for string handling. To do a lot of manipulation is tedious and error prone. You’ll find safe versions of many of the standard functions for things like string copying and appending. The difference between the safe functions and the non-safe functions is that the safe functions include a maximum length.
For example strcpy() is used to copy a string. It’s definition is this:
char *strcpy(char *dest, const char *src)
That is, it copies a string pointed to by src to a string pointed by dest and confusing also returns a pointer to dest. What a waste of a function. It could have returned an int saying how many characters were copied instead. Because it relies on src pointing to a string (char *) that terminates with a null (or 0). If the null is missing it can copy a lot more characters and that’s how buffer overflow bugs happen. So you have strncpy which is defined as this:
char *strncpy(char *dest, const char *src, size_t n)
The extra parameter is how many characters are to be copied. That way if it goes wrong, it is limited to n.
The picture? That’s a different kind of sea string…<groan>
The original rogue used graphics. This was back in the era of terminals and home computers and graphics could be quite limited. So there’s a tradition of using text. However if you do a google image search for rogue game like I did here, you can see that while many of them are text there are a couple that are graphics.
As well as games programming, I like game design and one of the best ways to practise this arcane art is to look at other people’s ideas and borrow/pinch/steal/be inspired by them.
If you are looking for inspiration for games creation, take a look at
The internet archive (yes them again!) not only has archives of most things I’ve done, but they also 
This is a 4x game (Explore, Expand, Exploit, Exterminate) . “Select from one of seven races – or craft your own – to explore dozens, hundreds, or even thousands of systems in a galaxy of your choosing. Expand across unique and varied planets and ultimately exterminate – or subjugate – any who stand in your way either in offline single player or up to 28 player multiplayer.” as gog.com put it.