Reply to topic  [ 8 posts ] 
Learning C++ 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
Afternoon all,

I'm looking at learning some C++, specifically to do some binary file parsing but knowing it would be useful for other things.
As many of you may be aware, I come from a Java background. I now spend a lot of time on the command line using custom bash and perl scripts. I have a very tiny amount of C knowledge.
I would like to get a good book that explains not only the mechanics of the language (such as this is how X works"), but also how a project might be structured (this goes in the main source file, that goes in a separate source file, you'd use a class for this, here's how/why we use headers). I'm not particularly interest in how to use loops as that all looks pretty much the same as Java (or vice versa).

Any suggestions would be greatly welcome, especially is they are available from Amazon (I've got gift vouchers to use!), I've had a look at a few 'C++ for java programmers', but they are all quite old and potentially out of date (?).

Many thanks,
Ben


Tue Mar 05, 2013 3:51 pm
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
Reply with quote
Barring the 'standard' (Bjarne Stroustrop) book

I'll have a look at what I had and used at uni :)

in fact if you want the ones I have for the cost of postage it'll save me not needing to pack and unpack them when I move house next month :)

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Tue Mar 05, 2013 5:27 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
If you found them useful and they are of no use any more I would be very grateful.

Let me know if it's definitely ok and I'll pm you my address :)


Tue Mar 05, 2013 7:33 pm
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
Reply with quote
Well I appear to have premptively jumped the gun while I was at work.. seems they are at my parents now so won't be able to get them for some time

Had a look in my Amazon history, main one was Bjarne Stroustrup's book as well as
http://www.amazon.co.uk/Programming-Pro ... b_title_bk

You'll probably breeze through it but the book is a good focus for picking up C language based quirks, for the most up to date language features, or for an expensive and very heavy paperweight
http://www.amazon.co.uk/The-Programming ... 001&sr=8-1

Is it just C++ programming or was there anything in specific you wanted to apply the language to?

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Wed Mar 06, 2013 12:21 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
The specific reason I want to learn C++ at this time is that I've been given a task at work. Some of the logs we get from the train get corrupted with the wrong time stamp, so a sliver of data is captured in 2004 rather than 2013. The 3rd party program that parses and displays the data doesn't fix this, it displays the data on an unbroken timeline in screens of 30 minutes, from the first record to the last and to navigate through the data you have six controls: Go to beginning of log, jump back 6 hours, jump back 30 minutes, jump forwards 30 minutes, jump forwards 6 hours, go to end of log. So, when we get corruption (which is all the time) we have to scroll through years of dataless screens.

We know the structure of the binary file that the logs are stored in, and someone has written a Java app to cut out just the day you are looking for, but he manages to corrupt some extra data in the process. I've been asked to do a better job :P I though that C++ looked to be a good tool for the job.

Heading to Amazon now to look at the books, thanks very much for the recommendations :)


Wed Mar 06, 2013 9:11 am
Profile WWW
What's a life?
User avatar

Joined: Thu Apr 23, 2009 7:26 pm
Posts: 17040
Reply with quote
Hmm.. what OS are you doing this on? Unixy stuff is probably good for C++ but if it's windows you'd probably be better off with C#.

Jon


Wed Mar 06, 2013 10:27 am
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
I'm using Windows at work, but I want it to be fairly cross platform.


Wed Mar 06, 2013 10:44 am
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
Reply with quote
forquare1 wrote:
I'm using Windows at work, but I want it to be fairly cross platform.


C# then :) It's my bread and butter so can probably help out more than something I havent used in years

Grab Mono, there is a standalone IDE if you can't get Visual Studio (MonoDevelop) and sortof like Java when you have the VM installed (JVM equivalent is the CLR or common language runtime IIRC) it will run the same

Reason for using Mono libs where possible is some C# libs actually p/invoke MS C++ libraries not available (Entity framework does this). The reflection library (Cecil) is IMO superior to the standard .Net one too

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Wed Mar 06, 2013 10:44 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.