c++ programming

Soldato
Joined
30 May 2007
Posts
5,012
Location
Glasgow, Scotland
Hiyahh!

Half interested in learing a wee bit of c++ :)

Intend on doing it using a windows system...! So what is out there and is good as a programming enviroment and good compilers?

Thanks!

Craig :D
 
Firstly do you have any programming experience?

Why have you chosen C++?

Are you looking for free IDE's / Compilers?

What are you actually wanting to do with the language?
 
Firstly do you have any programming experience?
I done a bit of Visual Basic a few years ago in college, i took to that ok :)

Why have you chosen C++?
Seems good for what i want to know... bit of both worlds, a good starting point and also very advanced for if and when i ever reach that level :P

Are you looking for free IDE's / Compilers?
Yeah basically... finding some good resources now, but id like to know what other people use, what evryone else thinks is good :) Dont want to be using the first thing i find!

What are you actually wanting to do with the language?
Its more of a project/hobby thing for me really. After doing visual basic in college i created a couple of pointless wee programs... easy ones. Id like to do the same with C++ then progress further. Calls, different libraries, etc.
 
BloodShed DEV C++
Microsoft Visual Studio

Those are what I use for my uni work. I hate C++ with a passion, after doing 3 years of embedded C/ASM they chuck high level object oriented stuff at us and it boggles my head.
 
MS Visual C++ will probably be the best in terms of support, ease of use etc. Maybe there's a student version if it if you have it.

GNU GCC can also be used through Cywin. This is free but will probably be a minor headache initially. This is the granddaddy with steep learning curve.

There's also Eclipse C++ IDE which is the Java Eclipse with C++ bits to hand gdb debugger etc. I've used this and the C++ is support is good. It will use the GNU GCC compiler tools in the background.

Books...
For general C++ then "The C++ Programming Language" by Stroustrup. This is a good book but may feel like a vertical learning curve initially (like a language reference). After this there's "Effective C++" by Meyers which adds the 'gotchas' and helps you to navigate around them.

There's probably some MS C++ library books that are good but I don't use it.

After you've got into the basics and learnt classes etc I would have a read of "Design Patterns" by Gamma,Helm,Johnson and Vlissides. This will show you some useful interesting ways of putting classes and interfaces together - just don't overdo it or it will be a mess!
 
Last edited:
Thanks for all the suggestions so far everyone! :D

NickK, thats awesome! Will look into all of them, and see whats what! Good idea about the Design Patterns book too... shall investigate!

Pho, cheers! Didnt know you could get the MS stuff free! Great how they do free versions for VB, C++ and C# :) (unless these arnt full working versions lol) Whats the difference in .NET... whats it good for?

I found quite a detailed site, which i have had a good read of... and its mentioned Code::Blocks? Is this much use...?
 
You just get less features in the free version compared to the other versions but they are fully functional. Here's a comparison.

.NET is a framework which essentially provides you with lots of things already written for you. In standard C++ you'll have to write a lot of those things yourself (unless you use C++ frameworks). I.e. support for XML is built in whereas in C++ you'd have to either write your own parser or find a pre-made one.
 
Last edited:
Pho, cheers! Didnt know you could get the MS stuff free! Great how they do free versions for VB, C++ and C# :) (unless these arnt full working versions lol) Whats the difference in .NET... whats it good for?

To be honest, .NET languages like C# are far more suitable as general purpose languages. C++ is very powerful but you'll rarely – if at all – find youself needing that extra power over the convenience and expressiveness that the .NET languages offer (unless you have some very specific goals). C# and VB.NET also have more support from Microsoft, since all of their attention is currently directed at the .NET platform, and will be for the foreseeable future.
 
Last edited:
Visual Studio is a very good IDE. It has everything you need (and more) and it's widely used to support is good too.

As for choice of programming language, it depends what you want to get out of it. If you want to learn it for the sake of just knocking out a few programs as a hobby, C# would probably be your best bet. If you want to actually learn programming with all the nitty-gritty stuff included that makes you seem really intelligent, then C++ is better.

C++ is far more powerful and it's more efficient too. C# is easy to use and has frameworks for many different things that can aid you. Plus it's easier to create Windows GUI apps with C# than it is with C++.
 
It all depends on whether you want to program. If want something basic that looks good with a nice GUI but in not really technically any good then get using something like Visual Studio. If you actually want a decent introduction into programming that'll be useful no matter what the platform or the task I'd just download cygwin and g++, get used to compiling and running projects that way and your go to go on most platforms (it'll also give you a overview of how to use a linux command line too).

It's always best (IMHO) to have some idea of what you'd like to be capable of, as an end point. Otherwise (as I've seen sooo many times) people just plop about reading a few notes and end up learning little more than how to write a *very* simple program whilst thinking they know much more.

If I was "young" again I'd start of by saying "Hey it'd be cool to be able to predict football results - I'll have a go at doing this using C++", that task would introduce you to all sorts of areas of computer science (let alone C++ programming).

Good luck with it, and feel free to post any questions you have whilst you're getting along.
 
Visual Studio is a very good IDE. It has everything you need (and more) and it's widely used to support is good too.

As for choice of programming language, it depends what you want to get out of it. If you want to learn it for the sake of just knocking out a few programs as a hobby, C# would probably be your best bet. If you want to actually learn programming with all the nitty-gritty stuff included that makes you seem really intelligent, then C++ is better.

C++ is far more powerful and it's more efficient too. C# is easy to use and has frameworks for many different things that can aid you. Plus it's easier to create Windows GUI apps with C# than it is with C++.

I looked into c# as it has been mentioned a few times... but i have defo decided to try c++ i think :) As you say c# could be better for ease and knocking up quick things... but id like to have the c++ so i can advance on that, when and if the time comes!

Well either that or .NET... but for some reason, it confuses me. I cant seem to find the same asmounts of info on it as i can for c++ :/

Thanks a lot for all the help so far guys... cant wait to finally give a good wee attempt at learning something :)
 
Thanks dangerstat... think i missed your post :\

Not really too sure what i want to be capable of... but dont want to get good at something (like c#) to find it has limitations!

At the moment id just like to get to a similar stage i was with vb... easy to create wee programs that came to head, simple math, wee db, etc kinda ones! But i want to know more, and keep building at what i know! Just aim to do it with practice and putting all that i learn into what i create, over time! Wee projects as i think of them :)
 
I looked into c# as it has been mentioned a few times... but i have defo decided to try c++ i think :) As you say c# could be better for ease and knocking up quick things... but id like to have the c++ so i can advance on that, when and if the time comes!

Well either that or .NET... but for some reason, it confuses me. I cant seem to find the same asmounts of info on it as i can for c++ :/

Thanks a lot for all the help so far guys... cant wait to finally give a good wee attempt at learning something :)

C# is a .NET language; .NET is a framework/runtime upon which quite a few languages are built.
 
From what you've said, if you want to create simple programs in Windows, then C# seems a no-brainer.
You really aren't going to get much extra use out of C++ unless you start delving into the real low level stuff in Windows.

If you've done any sort of VB before then C# will seem more intuitive than C++, so this is where I would recommend you start.
If you feel that you need to get lower level at any point, then the transition won't be too difficult.
 
See what i mean... this is judt confusing me! lol

The .NET Framework is a set of libraries and tools that are available to any language that uses it, of which C# is an example.

I don't meant to sound like an evangelist, but it does sound like C# would be more suitable. C++ will require you to understand the nitty-gritty aspects of programming, while at the end of the day what really matters is good program design, which C++ is not so conducive to learning.

Besides, creating rich user interfaces is a cinch in C#/VB.NET, whereas it'll take a lot more effort in C++ :)
 
Last edited:
The .NET Framework is a set of libraries and tools that are available to any language that uses it, of which C# is an example.

I don't meant to sound like an evangelist, but it does sound like C# would be more suitable. C++ will require you to understand the nitty-gritty aspects of programming, while at the end of the day what really matters is good program design, which C++ is not so conducive to learning.

Besides, creating rich user interfaces is a cinch in C#/VB.NET, whereas it'll take a lot more effort in C++ :)

I don't think this statement is true "..good program design, which C++ is no so conductive to learning", in fact I'd say the opposite.

On user interfaces, though I can understand why many of you think .Net type approaches are great if you talk to seasoned professionals they'll be first to absolutely slate using any GUI design tools that generate "auto code".
 
I don't think this statement is true "..good program design, which C++ is no so conductive to learning", in fact I'd say the opposite.

Well, I mean that in the sense that a beginner is likely to get bogged down with mechanical minutiae like reference management and not be able to spend enough time looking at the bigger picture and learning how to structure a program properly. At the end of the day, C++ is a more difficult language to learn to use properly, which slows progress and diverts attention from more general programming skills which are independent of the language being used. C# probably isn't the best language to start with either – something like Python or Ruby would be good – but given what the OP wants to do, C# sounds like the ticket.

On user interfaces, though I can understand why many of you think .Net type approaches are great if you talk to seasoned professionals they'll be first to absolutely slate using any GUI design tools that generate "auto code".

I don't think the OP wants to use it in a professional context. From the point of view of an amateur programmer, I don't think there's any better he can do than .NET's GUI tools. Besides, there's no auto-generated code in WPF – it's all done declaratively via XAML (in fact I prefer to code the user interface directly rather than have the designer create my XAML for me; it's a little like writing a web page this way).

I knew I'd get slated for making that post though :p
 
Last edited:
Back
Top Bottom