Wheh you're designing an object oriented class, you'll often use other objects within it. For example, you may design a Ferry object and within it use a Time object (for when it's scheduled to leave, perhaps):
Ferry *mersey = new Ferry(new Time(17,45),14);
There's really no special sy ....
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 examp ....
I spent quite a while with one of the delegates on our C and C++ course yesterday looking for the cause of compile / load errors including the text:
Dwarf Exception Unwind Info
The whole thing was very bizarre - from a perfect compile just a minute of two earlier, and with minimal sourc ....
I can recognise faces. But I'm not good at putting names to faces. Introduce me to someone - "this is Bill Brown" - and the name "Bill" will stick as I talk with him; I'll listen and learn about him, form an impression which I'll remember in summary. But, alas, I have trouble remembering that it' ....
"But how do I read data from a file ....?". Question on a C++ course on which we had concentrates, thus far, on object orientation.
In summary:
1. Include the fstream header file
2. Create an object of type ifstream using the constructor, and passing in the file name
3. Read lines from the ifstre ....
The first results from the 2011 census have been released ... showing various population statistics over wide geographic areas. [download site].
The population of England rose from 49,138,831 in the 2010 census to 53,012,500 in 2011 - that's a rise of 7.9% (permanent residents of all ages). The po ....
I was training near London Bridge at the end of the week just gone ... a commute home after the end of the course, via the Jubilee Line, the Bakerloo Line, First Great Western, and a pickup by car. As ever, only that last leg to Melksham was ill served by Public Transport, with the train arriving a ....
A training course in London - near London Bridge, and I'm staying locally. A few pictures taken already this morning; this is a photogenic city, even though most of the commuters who work here rush by without taking a glance.
....
A year ago, Lisa and I were cruising in the Mediterranean in early July - which I was reminded of yesterday when I spoke with our dedicated server hosting company concerning their service for the next twelve months. This year, I wasn't in Rome but in East Anglia on that date; by contrast, the se ....
"Weren't you on a boat somewhere last year when we spoke?" asked Atiqur when I called him yesterday to talk about our server upgrade / annual contract. Indeed I was, and I was impressed not only by his memory (he assures me it's not just his computer system of notes!) but by the speed of upgrade; ou ....