G52CPP Summary Lectures Labs Coursework Revision Questions

This is an old page. Please go here for a choice of years.

OLD 2012/13 G52CPP C++ Programming - for 2012/2013

Moodle

The moodle page is here. There is more information on these web pages than on the moodle page though.

Questions

There is a moodle forum for questions here.

You best options for asking questions are:
1) Ask me or one of my assistants in the labs
2) Ask me after one of the lectures
3) Use the moodle forum
4) Email me if the moodle forum is not appropriate. This is the first year I'm using the forum and I am hoping it will hepp to reduce the number of emails I get for this module. It should at least stop me having to answer the same question a lot of times in different emails. We'll see how it goes.

Lectures

The module has been structured to have two compulsory lectures per week, but there are three lecture slots. Apart from in the first week, I will use one slot each week for demonstrations and practice, and for an introduction to the informal and formal courseworks, rather than giving new C++ information.
In the past, students have said that these extra demo lectures were one of the things they liked most about the module, so if you can then you should try to attend all of these, so that you can see practical demonstrations of how to compile, debug, and edit C/C++ programs.

The official timetable is here (timetable for G52CPP, 2012/13).
Lecture slot 1: Thursday 4pm, LT3 Exchange building
Lecture slot 2: Friday 10am, LT2 Exchange building
Lab session: Friday 11am to 1pm, A32 lab
Lecture slot 3: Friday 2pm, C3+ Exchange building

Lecture slides and details are here. Lab notes are here.

Module summary and purpose

What does the module involve?

The official module catalogue entry is here.

I am very keen on keeping this module practical rather than too theoretical, so that when you leave you have skills which are usable in industry, and will hopefully be familiar with the sort of situation you will meet in industry. You will learn about the basic features of C++, and will have a chance to practise these in the labs and courseworks. The exam is aimed at testing your understanding not your memory, and will be similarly structured to the exam for G52CFJ for the last three years, except that it will consider only C++ rather than any differences between C and C++. The exam has a lot of questions testing whether you can understand what code samples do or how to correct incorrect code, where the samples themselves illustrate specific C++ concepts - so that, if you understand the concept then you can understand the code and get the right answer. WARNING: Memorising lecture slides is not sufficient to pass this module - you have to understand what the concepts actually mean in practice.

We will start with a (brief and fast) revision of things you should know from the C programming module in the first year, and consider how these are relevant for C++. We will then look at the new C++ features which have been added to simplify programming. We will NOT be considering the advantages of object oriented rather than procedural programming, or any of the theory of object oriented programming, although I will thouch briefly on some of the main concepts so that you can see the reasons why certain features exist.

The content of this module will be very similar to last year and to that of the previous G52CFJ module, except that you know more about C than the previous students did, so I can cover the C-type concepts more briefly, cutting down on the amount you need to learn.

Book list

I have asked the library to set up a reading list for the module, which you can get here.

I'll discuss the books in the first lecture, since different books consider different aspects or from a different perspective.


If you want one book for reference then I'd suggest:

The Complete Reference: C++, Fourth Edition (by Herbert Schildt)

This has a similar structure to this module in that it first considers the C part of the C++ language then moves on to consider C++. It not only takes you through the principles one by one but it is also a good reference book and has plenty of examples.


You may also wish to consider:

The C++ Programming Language (by Bjarne Stroustrup)

This is probably the definitive book on the C++ language, but is NOT a tutorial. It is good for finding out what a compiler SHOULD do with specific code (although compilers are often not entirely standards compliant).

There are many other C++ books that you may find useful, and it is worth scanning the library on Jubilee campus. The problem with most of the modern books, however, from the point of view of this module, is that they start with C++ and object oriented programming whereas we will start with C and procedural programming. Examples include:

C++ How to Program (by Deitel and Deitel)

This book starts with C++ and object oriented programming. The aim of this is to help you to get an object oriented mindset right at the beginning, which will hopefully avoid some potential problems with it later. Unlike this book, the first book in the list deliberately considers C rather than C++ initially, to help you to understand what is happening underneath, that C++ (like Java) can hide from you.

‘Effective C++’ and ‘More Effective C++’ (by Scott Meyers)

These explain many confusing elements of the C++ language and go into much more detail than you will actually need to complete this module. However, increased understanding is never a bad thing and it will stand you in good stead in job interviews. These are ideal for understanding ‘why’ as well as ‘how’, but are NOT introductions to C++.

Other online sources:

You may also want to consider online references, many of which you can find using a search engine.
e.g. http://www.cplusplus.com/doc/tutorial/