Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

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 C238
Exercises, examples and other material relating to training module C238. This topic is presented on public courses Learning to program in C++, C++ for C Programmers, C and C++ Programming

You may have heard of design patterns - factories, singletons and the like. The C++ template system provides a base from which you can implement your design, whether you've used UML or some other technique.
Articles and tips on this subjectupdated
3982Using a vector within an object - C++
Background - why? It's very common in program to have a whole lot of objects which when collected together make another object of a different type. That different object isn't going to be part of the same inheritance tree either - it's simply an associated object type / class. That's a bit of an abstact ...
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 ...
3509Operator Overloading, Exceptions, Pointers, References and Templates in C++ - new examples from our courses
I've added three new C++ examples to our library following on from last week's C++ course. Each of them is one step beyond "hello world" with regard to the particular feature it's showing, but isn't so advanced and showing so many options that it confuses the newcomer - at least that's the theory. ...
3388Templates in C++ - defining a family pattern of methods / functions
In C, function names need to be unique. If you try to compile or load two functions of the same name, even with a different number / type of parameters, you'll get an error rather than a runnable file out of your compile / load process. See [here]. In C++, you can have methods (functions) in each class ...
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 ...
3245Collections in C and C++ - arrays, vectors and heap memory blocks
If you want to hold multiple values within a table in a program, you'll want to use some form of collection or table - and in many languages including C++ and C, the most straightforward type of collection is an array. An array occupies sequential locations in the computer's memory when your program ...
1478Some new C programming examples - files, structs, unions etc
A series of new "C" examples have been added to the web site - a course for a small group allowed me to go somewhat away from the more normal run yesterday and write some new illustrations in front of them. Call by value v call by pointer comparison: link Using extern to share a variable between two ...
Examples from our training material
clever.cpp   Reference, pointers, templates
flow4.cpp   Reading a file within a factory, tokenising, vector
makefile   Compile / Load instructions for examples in this module
swab.cpp   more features of templates
template.cpp   Function templates
trans.cpp   Use of a vector as a member within an object
vec01.cpp   Use of a vector in C++
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
Template definition - parameterized types.
Template functions.
Templates and friends.
Static members and templates.
Exceptions and templates.
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/C238.html • PAGE BUILT: Wed Mar 6 10:39:20 2013 • BUILD SYSTEM: wizard