Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
20.9.2014 - We have just updated our course layouts and descriptions and added our 2015 schedule.


Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
C and C based languages module C239
Putting it all together
Exercises, examples and other material relating to training module C239. This topic is presented on public courses Learning to program in C and C++, C++ for C Programmers, C and C++ Programming, Learning to program in C and C++, C and C++ Programming

Background
In this section we'll show you several complete but small applications in C and C++ that put together all the various facilities we've covered so that you can see how they all interact in real life. One of the big uses that's made of C and C++ in some organisations these days is in adding specialist facilities to PHP, Perl, Tcl and Python and this module also provides a brief introduction to how this is achieved.
Related technical and longer articles
What makes a good variable name?

Articles and tips on this subjectupdated
3810Reading files, and using factories to create vectors of objects from the data in C++
On our C++ courses, we concentrate on objects and object design. But we also take a wider look at topics such as references and templates that go to making the complete language, with sections covering changes to things like file handling from the underlying C language. I've just added a new example ...
2012-08-11
 
3252C++ - unknown array size, unknown object type. Help!
There are time when you're writing a program where you say "I don't know". • I don't know how many records / object I'm going to read from a data file into an array - so I can't set the size of my array • I don't know what sort of object I'll be creating from a line I've read from a data ...
2011-04-17
 
3069Strings, Garbage Collection and Variable Scope in C++
In C, you'll handle strings as arrays of chars (type char *) and that does work - but with grumbles from the compiler about deprecation - in C++. The more modern (or shall we say "more OO") approach is to handle strings as objects - and those will be objects of type string, with headers loaded via   #include ...
2010-12-04
 
3067Using C and C++ functions in the same program - how to do it
If you have some native C functions that you want to include in your C++, can you do so? The answer is a - slightly reserved - yes. Firstly, you need to have your main program in C++ rather than being one of the C elements. Then you need both the C and C++ compilers to be from the same family / ...
2010-11-24
 
2851Further C++ material - view new or old
I've taken out the old header <iostream.h> and replaced it by the current <iostream>. I've adding in using namespace std; where I've need to, in order to allow me access to cin and cout without a need to prefix then with std:: under the new header file (and to save me loads of errors at load ...
2010-07-04
 
2674Make and makefiles - a commented example to help you learn
If you're making an executable C++ file you build it from a whole lot of .o files, each of which you have compiled from a .cpp file. And you also build in library files. If you change a .cpp file, then you have to recompile it into a .o ... but don't forget that you also have to recompile the .cpp ...
2010-03-13
(longer)
2673Multiple Inheritance in C++ - a complete example
C++ and some other OO languages support multiple inheritance ... Java and some others do not, and it's often argued that multiple inheritance is an unnecessary complication. That may be the case in some languages, but certainly in Perl 5 it is necessary to have it to make use of eome of the modules ...
2010-03-12
 
2646Compile but do not run PHP - syntax check only
The -l option to PHP on the command line compiles but does not run the code in the file - so it's very useful for syntax checking your code. Here's an example where I tested a file with a deliberate mistake: -bash-3.2$ php -l wsse.php Parse error: syntax error, unexpected '{', expecting '(' in wsse.php ...
2010-03-03
 
925C++ - just beyond the basics. More you can do
Things you can do in C++ ... just a bit beyond the first basics of a class: 1. You can declare that a method is const if it doesn't change any of the instance variables and that will make it a bit more efficient when you run it. 2. You can refer to an instance variable within a method using this-> ...
2009-01-01
 
1181Good Programming practise - where to initialise variables
It's a good idea to initialise your variables directly before you use them for the first time if you're going to use them as accumulators. By accumulator I mean that you're going to write assignments such as:   $n += 4; # Perl   incr notepad; # Tcl   lappend flcodes [lindex ...
2007-05-11
 
945Code quality counts
We're celebrating Geekmas this weekend ... and we've got a full place. Plus others who are coming in for the day. Really good session yesterday on the good DESIGN of an interactive (scripted) web site that "mines" user information to give a tailored presentation, and a great intro by Paddy to Python's ...
2006-11-26
 
836Build on what you already have with OO
If I start recalling a "Goons" sketch, then I'll show my age .... but never mind. It was a RERUN that I saw ;-) Spike Milligan is counting votes at an election. "Two thousand, six hundred and forty two". "Two thousand, six hundred and forty three". "Two thousand, six hundred and forty four" ... "Would ...
2006-08-18
 
Examples from our training material
Expense.cpp   A second subclass for multiple inheritance demo
Expense.h   Header file for second subclass
Film.cpp   main subclass for multiple inheritance demo
Film.h   header file for main subclass - multiple inheritance demo
Filmtest.cpp   Main program for multiple inheitance demo
HireFilm.cpp   Main class for multiple inheritance demo
HireFilm.h   Main class specification - multiple inheritance demo
Make_mark_2   Alternative Makefile to show Makefile facilities
Makefile   Makefile for multiple inheritance demo
Ninety.cpp   vector, factory method, files, tokeniser
flow.cpp   Reading a file named on the command line within a factory
pd1.cpp   Inheritance in C++ - base demonstration
pd2.cpp   add an array of objects
pd3.cpp   Add an object comparator
pd4.cpp   add iostream / namespace, inline, new, printing function, override +
pd5.cpp   Switching from array to vector
trains.txt   Data file for flow / flow2 / flow4 examples
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
Practical examples of C and C++ programs.
Planning your application through UML and patterns.
Integration with PHP, Perl, Python and Tcl.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.


You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/resources/C239.html • PAGE BUILT: Thu Sep 18 11:03:17 2014 • BUILD SYSTEM: WomanWithCat