Exercises, examples and other material relating to training module C238. 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
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 subject | updated |
3982 | Using 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 ... | 2013-01-19 |
3810 | Reading 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 |
3509 | Operator 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. ... | 2011-11-06 |
3388 | Templates 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 ... | 2011-08-13 |
3252 | C++ - 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 |
3245 | Collections 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 ... | 2011-04-12 |
1478 | Some 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 ... | 2007-12-19 |
Examples from our training material
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
[here].
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
Ruby,
Lua,
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.