|« September, 2005||November, 2005 »|
by: WaltP October 24, 2005 00:52:19
Definitely a matter of choice, I will outline various ideas for naming variables, functions, and the like for ease of readability. Let's tackle the obvious one first:
Things to Avoid in C/C++ -- void main(), Part 10
by: WaltP October 19, 2005 11:25:22
C/C++ programmers are sometimes allowed to do some things they really shouldn't. We are given functions that are supposed to be useful but aren't because of hidden faults, or taught ways to do things that are bad, wrong or not necessary. This post will discuss one of these.
Reading a Single Character
by: WaltP October 10, 2005 12:25:26
C / C++ buffers its input which means a RETURN must be entered to get standard input functions to continue. This RETURN is actually added to the input stream, which will cause character inputs to malfunction.
Here is a function you can use to read any single, non-whitespace character. This would be used in place of scanf("%c", &ch) or ch = getchar() to make sure you actually get to input the value:
Installing Borland's Command Line Compiler
by: WaltP October 9, 2005 10:09:14
I just installed the Borland 5.5 and thought I might as well write up the steps since we periodically get questions about this topic.
First, go to Borland's C++Builder Downloads page and click on compiler. A new window will open and simply answer their questions. You will have to log in or sign-up (it's free).
Heavy Weapons available at CMRPG
by: crystalattice October 8, 2005 08:52:34
For those of you keeping track, I've just added some new topics to the Colonial Marines RPG web site. It's still something I'm working on, even if I don't have the time to devote to it like I used to.
For those who haven't noticed, I've been posting all the Python tutorials that are available here on GIDNetwork both on the CMRPG forum and also on the CMRPG web site itself. Nothing different or special about my site's tutorials, just an alternative location to find them and talk about them.
Beginning Python Tutorial (Part 7)
by: crystalattice October 7, 2005 10:24:44
Working with Files
The final built-in object type of Python allows us to access files. The open() function creates a Python file object, which links to an external file. After a file is opened, you can read and write to it like normal.
Beginning Python Tutorial (Part 6)
by: crystalattice October 6, 2005 09:48:21
The final built-in data type is the tuple. Python tuples work exactly like Python lists except they are immutable, i.e. they can't be changed in place. They are normally written inside parentheses to distinguish them from lists (which use square brackets), but as you'll see, parentheses aren't always necessary. Since tuples are immutable, their length is fixed. To grow or shrink a tuple, a new tuple must be created.
Beginning Python Tutorial (Part 5)
by: crystalattice October 4, 2005 19:27:32
Next to lists, dictionaries are one of the most useful data types in Python. Python dictionaries are unordered collections of objects, typed to a keyword. Python lists, on the other hand, are ordered collections that use an offset. Because of their construction, dictionaries can replace many "typical" search algorithms and data structures found in C and related languages.
Things to Avoid in C/C++ -- scanf / epilogue, Part 9
by: WaltP October 1, 2005 20:24:08
scanf() / So what's a programmer to do?
scanf() is not designed for production code, but for creating test programs to see if other aspects of the program are working. scanf() will replace the complicated input routines so that other modules can be exercised and perfected. Then the scanf() is replaced with the real input function that gets the actual data from a file, a device, wherever the actual data is stored.
Recent GIDBlog Posts
|« September, 2005||November, 2005 »|
Copyright © GIDNetwork™ 2001 - 2016
Another website by J de Silva
Page generated in : 0.07282 sec.