Source Code Listing

C Code, C++ Code, Pascal Code, QBasic Code, Visual Basic Code, Game Programming Projects, Web Sites

The following is a list of the code that I have authored, unless otherwise commented. I have broken the code down into specific listings by language. This listing, by far, is not complete. This page will remain under continuous construction until I have finished with school. At that point, it will undergo a drastic facelift to become my "living" resume.

I have also begun to do a little freelance web-site design. In addition to my source code, I have included a section with links to the sites that I have created. Feel free to send comments about any of the code or the web sites that I have created. I am ALWAYS open to constructive criticism.

All the code included on this page is free for public access. I only ask that you drop me a note to let me know if you find something here that is useful to you. Most of the code included here is not commented very well.


C Source Code

average.c
This program simply allows the user to enter an arbitrary number of integers, then displays the average.
caps.c
This program uses bitwise operators to convert lowercase alphabetic (ONLY) characters to uppercase.
cw.c
This program emulates the functionality of the word count ("wc") UNIX command. For a more complete description, type "man wc" from the UNIX/Linux system shell. The program's results are undefined when attempting to count the "words" in an executable/binary file.
ellipse.c
A very simple, menu-driven drawing program
factor.c
Simple integer factoring program. Displays the integer as a product of prime numbers.
factor2.c
An improved factoring program. This program will factor large integer values (up to and including the largest 'unsigned long int').
hanoi.c
This program will tell you how many calls to the recursive hanoi function is required to solve the "Towers of Hanoi" problem with n disks.
kruskal.c
This program is an implementation of Kruskal's Algorithm for determining a minimal spanning tree for a connected, non-directed, weighted graph.
macro_min.c
This was an exercise in C macros. It simply returns minimum values. It is a good starting point for producing a dynamic version.
matmul.c
A matrix multiplication program. It is an implementation of dynamic programming.
menu.c
A very simple menu program. This program can be easily modified to serve as the basis of a larger program.
pal.c
This program will identify whether or not a string of characters (line) entered by the user is a palindrome. The program will accept a maximum of 80 characters to check.
power.c
This program finds and displays the smallest powers of two whose last n digits end in all "1s" and "2s".
ptr.c
This program illustrates why it is necessary to use pointers to swap values in C programs.
repeat.c
This program accepts data from standard input and reports the number of times that letters are repeated.
repeat1.c
repeat2.c
This program does the exact same thing as repeat.c does. It was simply an exercise in using multiple files to create programs. To implement the program you will have to use repeat1.c and repeat2.c.
rotate.c
This program uses pointers to rotate the elements of an array in a positive/right direction or in a negative/left direction. It also uses command line arguments during compilation to adjust the array between 'integer', 'character', or 'float' types.
timehack.c
Simple time subtraction program
TTTutor.c
A Times Table Tutoring program with the very young student in mind. This program generates random 2-value multiplication problems and gives the user two opportunities to obtain the correct answer. If the user is unable to determine/obtain the correct answer, the program then gives the user a 'walkthrough' on solving the problem.
sigint.c
This program demonstrates the use of signal to trap keyboard interrupts from the terminal. The program was written and implemented in UNIX, so the results are undefined on any other platform.
[GoTop Button]Go to the top of the Source Code Listing.

C++ Source Code

ALL files in each section are required for each project listed
linelistmain.cpp
linelist.h
linelist.cpp
A simple line editor program
mpgcalc.cpp
A multi-leg trip monitor for fuel economy
pathfinder.cpp
maze.h
maze.cpp
A recursive maze solving program. The user creates and enters a maze and then the program begins to search for a possible solution
racquetball.h
racquetball.cpp
A racquetball simulation program based on server probabilities, displays number of games won, percentage of serves won, etc
rball2.cpp
rballgame.h
rballgame.cpp
simstats.h
simstats.cpp
A racquetball simulation program based on server probabilities. This version is a much cleaner, more modulistic approach to solving the problem
rball2_mono.cpp
A racquetball simulation program based on server probabilities. This was the first version of the program in its monolithic form
sol_main.cpp
newdeal.h
card.cpp
dealer.cpp
rand2.h
rand2.cpp
A very simple solitaire game played by the computer alone
[GoTop Button]Go to the top of the Source Code Listing.

Pascal Source Code

cs65.p
File containing routines that are necessary to run some of the programs listed below. Include this file in the project file of the pascal project if the program below contains the line: "USES cs65"
big-x.p
An "X" drawn in graphics mode
bowling.p
A graphical scorecard for bowling
codebreaker.p
A decoding program for simple, polyalphabetic encryption
codebreakerhelper.p
A verification program to ensure accuracy of codebreaker.p
codemaker.p
An encoding/decoding program for simple, polyalphabetic encryption
elevator.p
A simulation of an elevator's embedded system
histogram.p
A simple, text mode histogram displayer for a population of heights
investment.p
A grahical representation of an investment - fixed inflation built in
powerfinder.p
This program finds and displays the smallest powers of two whose last n digits end in all "1s" and "2s". Same as "C" version above.
randomcode.p
An encoding/decoding program for simple, polyalphabetic encryption
serversim.p
An internet server simulation program
serversim2.p
An internet server simulation program
sortarray.p
A simple find and replace array sorter
supertutor.p
A simple mathematics tutoring program - addition only
timehack.p
Simple time subtraction program
[GoTop Button]Go to the top of the Source Code Listing.

QBasic Source Code

1122_16.bas
Prints table of temperature conversions
1123_24.bas
Very primitive, text-based dice game - Craps
1124_14.bas
A fairly decent record management program for QBasic - Address Book
hangman.bas
My first attempt at a game. It's not that bad for QBasic :)
[GoTop Button]Go to the top of the Source Code Listing.

Visual Basic 3.0 Source Code

guess2.frm
A number guessing game
lincoln4.frm
lincoln.bas
My first multi-file program - displays famous quotes
[GoTop Button]Go to the top of the Source Code Listing.

Current Game Programming Projects

Only descriptions of the projects included here!!!

I eventually intend to include screen shots of the games here

Crown Quest
Will the king escape??? A strategy board game.
Final Phase
Can you be the ONLY one to complete the gauntlet of Phases??? A rummy-like card game.
Patrol Leader
Can you bring the unit back alive??? A role-playing, adventure game.
[GoTop Button]Go to the top of the Source Code Listing.

Web Sites Created by The Perkster

Warning!!! No return links included
Drake University's Department of Military Science
Army ROTC at Drake University - my first commercial web site.
How to Design a City Expert System
A web-site project created for a Logic & Algorithms class at the University of North Carolina at Charlotte.
[GoTop Button]Go to the top of the Source Code Listing.

Last Updated: 20 May 1999
[GoTop Button]Go to the top of the author's resume.
[SendMail Button]Send email to Greg.
[GoBack Button]Back to The Programmer's Palace homepage.