topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 2:53 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Best way to start learning C++?  (Read 37657 times)

wreckedcarzz

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,626
    • View Profile
    • Donate to Member
Best way to start learning C++?
« on: October 11, 2007, 06:43 PM »
Hello all,

Trying to get a basic understanding of the C++ (or C in general) programming language, and have read a couple tuts, but I am kinda lost. Does anyone have any tips on getting a basic "program" made, or links to tutorials that might be helpful? I can already make extremely basic "programs" but I am looking for a more solidified basis to work with before getting into (anything) complicated.

Ideas? Help? Links? :read:
-Brandon

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #1 on: October 11, 2007, 06:52 PM »
I suppose my first question is what kind of C++ do you wish to learn (winapi, linux api, stdlib etc). Also which compiler are you using, and also how high level do you want to go (api only, classes, frameworks like mfc, .net, wx etc)? Also, do you learn best by example or by reading?

Ehtyar.

wreckedcarzz

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,626
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #2 on: October 11, 2007, 06:54 PM »
Windows (Linux/Unix in the future possibly) and I am using the Dev-C++ compiler, and most likely .NET due to it being (as I have heard) the easiest to work with.

A little reading, a little off-on-my-own, a little reading to fix the 5 problems :P is how I learn.

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #3 on: October 11, 2007, 07:09 PM »
OK first you'll need to decide how much you want to leave yourself open to linux/unix in the future as this will significantly effect the way you code and what you use to do it. Secondly, Dev-C++ is not a compiler, but an IDE (a common mistake don't worry :)) which happens to come with the MingW Compiler. MingW I'm afraid is not capable of supporting .net, but from the way you spoke about .net in your post, I'm assuming you meant you would code in a dedicated .net languages as opposed to C++.net (please confirm either way). I am personally not a fan of MingW for various reasons, but this is as far as i will go in mentioning it, as there is next to no free alternative unless you're happy in plain C. This should about do it for answering questions, and we should be able to start pointing you to places now.

Ehtyar.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Best way to start learning C++?
« Reply #4 on: October 11, 2007, 07:15 PM »
as there is next to no free alternative

What about Microsoft Visual Studio 2005 Express? That's free. It's C++.

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #5 on: October 11, 2007, 07:17 PM »
I feel the need to add that regardless of which method you choose to learn, start work on a project that *you want to build*. The project will motivate you to learn without making it feel like you are learning. Just learning to learn, is sometimes hard. Practice exercises aren't always interesting. If you have a pet project you will want to work on it and the learning will come naturally.

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #6 on: October 11, 2007, 07:25 PM »
As are the new borland turbo products. I apologize I don't know what I was thinking. I am uncertain what the license of visual sudio express is like, but i would recommend borland only a hair above MingW due to the apparently lack of....well....anything from borland in regards to upgrades/support/standards compliance/code generation. I would highly recommend visual studio however (or at least the compiler) as it kicks he pants off of EVERYTHING else with features, code generation and standards compliance (i know, sounds rediculous right?).

Ehtyar.

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #7 on: October 11, 2007, 07:27 PM »
I feel the need to add that regardless of which method you choose to learn, start work on a project that *you want to build*. The project will motivate you to learn without making it feel like you are learning. Just learning to learn, is sometimes hard. Practice exercises aren't always interesting. If you have a pet project you will want to work on it and the learning will come naturally.
Took my first piece of advice right out of my mouth, and i could not have said it better, nor could i emphasize tin man's point more. This is how most people learn to code, because your motivation tends to push you just that bit further than you would ordinarily bother, which is usually all you need. Best piece of advice for any budding software developer.

Ehtyar.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Best way to start learning C++?
« Reply #8 on: October 11, 2007, 07:30 PM »
Buy a book.

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #9 on: October 11, 2007, 07:39 PM »
There is nothing i can say to that..... :P

Ehtyar.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Best way to start learning C++?
« Reply #10 on: October 11, 2007, 07:42 PM »
Well i usually write a long expository piece on finding a project to motivate you, etc., but for me the idea of learning a language without using a book just seems insane.  A good book is a good friend.

wreckedcarzz

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,626
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #11 on: October 11, 2007, 07:53 PM »
as there is next to no free alternative

What about Microsoft Visual Studio 2005 Express? That's free. It's C++.

I just downloaded that (am getting ready to install the service packs now), it looks good but it IS Microsoft ;D

I feel the need to add that regardless of which method you choose to learn, start work on a project that *you want to build*. The project will motivate you to learn without making it feel like you are learning. Just learning to learn, is sometimes hard. Practice exercises aren't always interesting. If you have a pet project you will want to work on it and the learning will come naturally.

That is the main reason I am working at this :)

Buy a book.


Might do that, there is a college just down the road that teaches computer programming, and my dad gets dicounts at the library... :-\

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #12 on: October 11, 2007, 08:16 PM »
Practice exercises aren't always interesting. If you have a pet project you will want to work on it and the learning will come naturally.

That is why I made this page: Stupid C Stuff

arunpawar

  • Participant
  • Joined in 2007
  • *
  • Posts: 60
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #13 on: October 26, 2007, 04:01 AM »
One of our member "Mahesh2k" has lot of Turbo c++ graphics programming and Dev-C++ IDE tutorials on his site you can try some of this from his site.
Take a look at http://onecore.net
Search thru entire of his site you'll come to lot of useful programming tutorials on this site.

If possible then try and get the Waite groups Object oriented programming using Turbo C++ by Robert lafore.It is easy to grasp book and u'll learn C++ in simple setps.If possible you can try other books that members suggest here.

Look at the source code of others read blogs related to C++ programming that is the only way you can learn much stuff about C++.


MS VC++ is certainly like hitting on the wall.You'll hit plenty deep on there.You can try Turbo C++ Explorer edition which is free and better than MS VC++.You'll be creating better programs both console and windows with this.Many developres start off with borland and later move onto other IDE or studio products.So try and learn from Turbo products or you can even learn Dev-C++.SkyIDE with Mingw setup can be used for learning.For Mingw installation refer onecore.net site it has tutorial on it.

MS VC is nonstandard it has its platform specific code in VC++.You'll learn many bad habits with MS softwares.That u'll not agree at the start.So if you're thinking to develop programs simply then try and learn from Turbo C++ 3.0 command line compiler itis easy to use and can be better option for beginers.


Hope this helps.
« Last Edit: October 26, 2007, 04:08 AM by arunpawar »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Best way to start learning C++?
« Reply #14 on: October 26, 2007, 06:08 AM »
MS VC++ is certainly like hitting on the wall.You'll hit plenty deep on there.You can try Turbo C++ Explorer edition which is free and better than MS VC++.
-arunpawar
Define "better"?

Borland used to have some good development products back in the nineties, but the code
generation of their compilers isn't up to par (haven't been for a long time), their standard library isn't all too great, and last time I looked C++ standards compliance was somewhat behind as well.

You'll be creating better programs both console and windows with this.
-arunpawar
And why is that?

If you stick to standard C++ features, MSVC wins because of better code generation. If you start using frameworks, Borland has the incredibly bloated VCL - even MS's MFC is less bloated than that.

MS VC is nonstandard it has its platform specific code in VC++.You'll learn many bad habits with MS softwares.That u'll not agree at the start.So if you're thinking to develop programs simply then try and learn from Turbo C++ 3.0 command line compiler itis easy to use and can be better option for beginers.
-arunpawar
You say MSVC is nonstandard and then goes on to say Borland isn't? And then especially mention TC3? Heh.

MSVC has a bunch of extensions, but nobody forces you to use them. TC3 has a lot of non-standard stuff, and back in the days lots of people used that non-standard stuff.

Stay away from the inferior borland products, especially the legacy DOS stuff like TC3. Go with MSVC or GCC or even DigitalMars (or OpenWatcom if you don't need C++). Learn the base language before dipping into GUIs and platform specific code.
- carpe noctem

mahesh2k

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,426
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #15 on: October 27, 2007, 04:20 AM »
Agree with fodder.

 :)
Arun Borland is good for starters.But If your programming for windows only then it doesn't matter wheather u use Borland or MSVC as starting tool.But it matters if you are thinking for cross platform coding even befire learning the langauge which is absurd thinking.At that point learn C++ then go with wxwidgets or FLTK or EFLTK or GTK.

MSVC is good,it has express version with which you possibly can create commercial software like you can do with Turbo explorer.If you're recomnding TC explorer for beginer then it is quite good but the TC 3 outdated and not suitable for beginners anymore.Though it is used extensively i country like india,china,pakistan.Again,point is  VCL is bloated so better to go with MSVC express 2005 instead of TC3.

My advice :
Get good book like : Robert lafore or Even some online tutorials.
Use better compiler with Good IDE.DeevC++ is fine for starters.
Don't jump to GUI until you are comfortable with foundation concepts of OOP and other.

Hope it helps.



hamradio

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 828
  • Amateur Radio Guy
    • View Profile
    • HamRadioUSA.net
    • Read more about this member.
    • Donate to Member
Re: Best way to start learning C++?
« Reply #16 on: October 27, 2007, 04:22 PM »
The C++ version of Turbo Explorer is Turbo C++ 2006. What is TC3? The older version?...Hmmm...


Edit by hamradio:

In the about box of my Turbo C++ it shows...

"Borland® C++Builder® for Microsoft® Windows™ Version 10.0.2288.42451 Update 2 Copyright © 2005 Borland® Software Corporation. All Rights Reserved."
« Last Edit: October 27, 2007, 04:27 PM by hamradio »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Best way to start learning C++?
« Reply #17 on: October 27, 2007, 04:30 PM »
I happen to love Borland's C++ Builder, which now goes by the name CodeGear's Turbo C++ (confusing history of name changes) which is basically C++ with a layer of GUI components that make it an extremely enjoyable way to build very substantial windows applications.

The one thing that was mentioned above and needs to be emphasizes is that this visual component system is a windows-only solution.  Which is a terrible shame and should give you pause before learning it.  wxWidgets and Qt are the cross-platform equivelent, although i don't find them nearly as enjoyable to use, nor are comprehensive.

I'm not sure i would recommend any of these to a new learner -- better to focus on the core C++ language and now mess with any of these GUI libraries are first.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Best way to start learning C++?
« Reply #18 on: October 27, 2007, 06:32 PM »
TC3 is Turbo C++ 3, back from the 16bit DOS days. Decent product with good IDE back in those times, but almost useless today unless you have some very specific needs. Back then I preferred borland turbo pascal though, it was faster and it didn't matter it generated worse code, you needed assembly for anything speed sensitive anyway ;)

mouser: Delphi and BCB/CGTC++ are indeed pretty nifty for glueing GUIs together quickly, Borland did succeed in Rapid Gui Design (I don't want to call it Rapid Application Design, even though components can be more than just GUI elements).

But if you take away the VCL (Visual Component Library, the GUI component library, for those that aren't familiar with Delphi and BCB), not many advantages are left - and the VCL isn't something you want to start with if your goal is to learn the C++ language and become proficient in it. I dunno if VCL can even be used with other C++ compilers than Borland's?
- carpe noctem

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Best way to start learning C++?
« Reply #19 on: October 27, 2007, 06:42 PM »
But if you take away the VCL (Visual Component Library, the GUI component library, for those that aren't familiar with Delphi and BCB), not many advantages are left - and the VCL isn't something you want to start with if your goal is to learn the C++ language and become proficient in it.


agreed 100%.

I dunno if VCL can even be used with other C++ compilers than Borland's?
nope.  and this is a real downside to using it.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Best way to start learning C++?
« Reply #20 on: October 27, 2007, 06:52 PM »
Dunno if MFC can be used with other compilers than Microsoft, btw, and I'm not sure about WTL/ATL either (but at least there you get the full source, so you aren't screwed wrt. license and no-source libraries).

So... learn the language without focusing too much on GUIs, then consider if you want vendor lock-in or a bit more complication and even more code bloat, but portable apps with a 3rd-party widget toolkit. Yeah, I know, clicking buttons is more fun and more awarding than the console, but you learn more the other way.

I also do agree that once you're beyond the basics + a bit more, you need to work on a project the interests you.
- carpe noctem

superboyac

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,347
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #21 on: December 28, 2007, 06:01 PM »
Buy a book.

Which book shall I get?  I'm trying to learn C++ in the way they use it at financial institutions for statistics and analysis.  I'm trying to get into a master's program and knowing C++ would help, so that's the application for me.  It's called finance engineering.  I'm not sure if you guys know how they use C++.  I'll try to find out more about it and post later, but if you have any ideas, please let me know.

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #22 on: December 28, 2007, 08:30 PM »
superboyac,

The world of financial software isn't dominated by any particular language. The low-level control C++ provides is not a requirement like it is for 3D games. Much of it is also written in Java. However, that also means that you don't need to learn anything special or do anything differently. A standard course of study in C++ should suit you just fine. Just don't get distracted by flashy graphics or physics, etc. Just learn solid programming skills.

superboyac

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,347
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #23 on: December 29, 2007, 11:28 AM »
superboyac,

The world of financial software isn't dominated by any particular language. The low-level control C++ provides is not a requirement like it is for 3D games. Much of it is also written in Java. However, that also means that you don't need to learn anything special or do anything differently. A standard course of study in C++ should suit you just fine. Just don't get distracted by flashy graphics or physics, etc. Just learn solid programming skills.
Well, just to clarify, I just want to familiarize with the language.  I'm not trying to actually do any functional programming.  I just don't want to be rejected from the program because a lack of programming skills.  Most people in the field say it's best to know the C++ language in general.

nosh

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,441
    • View Profile
    • Donate to Member
Re: Best way to start learning C++?
« Reply #24 on: December 29, 2007, 02:59 PM »
I learnt C reading Herb Schildt's "Turbo C/C++ - The complete reference" and loved every minute of it. I know he gets slammed badly in a lot of programming circles and I really don't know how much sense it makes to fire up a 16 bit compiler to learn programming today... so yeah, I'm absolutely no help. :)
But Schildt was a really good read, fun to go through - can't say that for most other programming books I've [attempted to] read.