Quick links: Main Lectures Coursework Lab notes Questions/Answers Revision Hall of Fame

G52CFJ C/C++ for Java Programmers - for 2010/2011

Important News:

Revision web page has been created, including old exams for practice.

Lecture and lab times and locations

The module has been structured to have two compulsory lectures per week.
There are three lecture slots and I will use one each week for demonstrations and practice, and for an introduction to the informal and formal coursework, rather than giving new C++ information.
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 lecture slides and samples can be found here.

The official timetable is here.
Lecture slot 1: Monday 10am, LT2
Lecture slot 2: Tuesday 11am, LT3 - probably the one which will be the practice one from week 2, depending upon your feedback
Lab session: Thursday 3pm to 5pm, A32 lab
Lecture slot 3: Friday 2pm, LT3

The lab notes can be found here.
Last year, the people who attended the labs found the coursework a lot easier than those who didn't. You are strongly recommended to take advantage of the labs for practice, feedback and help.

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 C++, and will have a chance to practice these in the labs and courseworks. The exam is aimed at testing your understanding not your memory, and will be similarly structured to that for the last two years. i.e. 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/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.

Module outline

The first five weeks look at procedural C and C++. C is not object oriented, but is very powerful. It's no accident that it is popular for programming games, operating systems and applications which must be fast. We will see why this is the case and you will see how fast it can be to create simple programs.

The next five weeks look at C++ features which are not included in C, using the knowledge that you gained about C/C++ in the first five weeks.

Any remaining time will be used for exam revision and preparation.

Book list

You can get the reading list here. (Login needed)
Or the G52CFJ list here. (Login needed)
From the book list you can get to electronic copies of some of the books! (click on the 'web resource' link)
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 language then moves on to consider C++.
This book not only takes you through the principles one by one but it is also a good reference book and has plenty of examples.
Although the amazon price has almost doubled in the last two months (increased demand?), you can still get it relatively inexpensively through amazon or the book depository (http://www.bookdepository.co.uk or through amazon 'Used and new' sellers). Although it would be inappropriate for me to recommend any specific book provider, I have used both of these for books and both have been reliable for me in the past.
You can read this online here. (Login needed)


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. The G52CFJ book 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/