C, C++, C#

Comparing OOP in php, java, and C++

March 18, 2010

Sample introductory Object Oriented Programming code in php, java, and C++ showing the similarities and differences. Never-the-less, OOP, despite all the bragging we hear about it, is a lot more expensive to write and to maintain than clean structured code. The reality of it does not live up to the theory, and the hype is "smoke and mirrors" propaganda, unfortunately. This simplest of introductions...

Read more »

accessing a MySQL db

February 12, 2010

4 sample C utility programs that came with MySQL 1. connect_test.c 2. select_test.c 3. insert_test.c 4. list_test.c They came with the disclaimer below. /* connect_test.c A program to connect to a database. ********************************************************************** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation;...

Read more »

screen I/O pgm

February 10, 2010

screen I/O pgm in C & Pascal This program will go through a list of songs, throwing out one song or another until it finds a total time that most nearly matches the target time. It will display and write to a (text) file the new (sub) list and, separately, the song(s) that it threw out. What was surprising was that with only 1...

Read more »

[C] File I/O and params

February 7, 2010

Simple example of file I/O, buffering, and input parameters. The pgm breaks a file into diskette (or any) size pieces. if the parameters are not correct, instructions are written to the screen. #include /* BREAK UP . C */ #define FALSE -1 /* +----------------------+ */ #define TRUE 0 /* | This c program is to | */ FILE *input_file_pointer ; /* | break a...

Read more »