Results 1 to 23 of 23

Thread: What is the best way to learn C++?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Posts
    219
    I have Microsoft Visual C++, but I don't understand it. I don't even know where to get started. Any suggestions? Good books, online tutorials...... anything?

    (I'm not familiar with the C language at all, but I am familiar with VB.)

  2. #2

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Also when you get familiar with C++ go to windows programming. This is a great tutorial covereing the basics if that area:

    http://www.winprog.org/tutorial
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    I'm also learning C++, and has just bought the book Visual C++ 6 for Dummies, which shows you the Basics in C++ and MFC.
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by Vlatko
    Also when you get familiar with C++ go to windows programming. This is a great tutorial covereing the basics if that area:

    http://www.winprog.org/tutorial
    I would not suggest trying to learn windows programming until you're familiar with these things (among others):
    pointers / arrays and the differences between them
    structure packing
    calling conventions
    typedefs
    function pointers (this is nasty )

    Although if you've got them pretty much sorted after 2 hours learning...go for it! For the Windows API you don't really need classes, although they can help to simplify what you do.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6
    Megatron
    Guest
    Try Teach Yourself Visual C++ In 21 Days. It's a great book for beginners.

  7. #7
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Originally posted by Megatron
    Try Teach Yourself Visual C++ In 21 Days. It's a great book for beginners.
    Teach Yourself Visual C++ In 21 Days is not a book for begginers. At the beggining i explains some basic things and then stsrts with SDI and MDI apps, window DCs and other not so simple windows programming related stuff. Also every piece of code is MFC

    Teach Yourself C++ in 21 Days is another story. It is great for begginers.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  8. #8
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    It sure is! I have an HTML version of it that I'm guarding with my life!
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  9. #9
    Megatron
    Guest
    Originally posted by Vlatko
    Teach Yourself Visual C++ In 21 Days is not a book for begginers.
    It's a matter of preference. I found it to be very useful.

  10. #10
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    Yeah, i found teach yourself C++ in 21 days to be very useful too. The best part is that it is free!

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  11. #11
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    Is this Deja vu or What ? This question comes up for the Unteenth time and the same people are answering it again!
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  12. #12
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    It gets more exciting each time!

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  13. #13
    Hyperactive Member MPrestonf12's Avatar
    Join Date
    Jun 1999
    Location
    NY
    Posts
    330
    Well, I have had decent luck reading C++ THe Complete Reference and then using what I learned to make a simple program. Experimenting with it also helps.
    Matt

  14. #14
    Megatron
    Guest
    Yes experimenting helped me a lot as well. I always tried to do more of what the book asked of me.

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Posts
    219
    Thanks guys for your help.

    I have started to follow the online version of Learning C++ in 21 days. There is a simple example included in the tutorial:

    1: #include <iostream.h>
    2:
    3:
    4: int main();
    5: {
    6: cout <<"Hello World!\n";
    7: return 0;
    8: }

    Will this work in Microsoft Visual C++? I have tried it but it didn't work. Can you guys pls help me?

  16. #16
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    That looks okay (obviously don't put the line numbers in the source code). Make sure you have "Win32 Console Application" as your project type.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  17. #17

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Posts
    219
    What do you mean by "Win32 Console Application"? Is it a template in C++? Like the ones you get with VB? (Data Projects, ActiveX Dll etc) ?

  18. #18
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    When you create a new project, you have a big list of project types. Use that one.

    So yes you're right, it's a template (but not in the C++ sense )
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  19. #19

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Posts
    219
    So when I select "Win32 Console Application", some components will be already be added? Like some ActiveX controls?

  20. #20
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Nope. It's totally empty. The two projects "Win32 Application" and "Win32 Console Application" have nothing in them -- you write everything yourself.

    The only difference between these two is that the Console one is for console/command-line programs, while the other is for Windows programs.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  21. #21

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Posts
    219
    Thanks guys.... I can't wait to try it out.

  22. #22
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Originally posted by Shafee

    1: #include <iostream.h>
    2:
    3:
    4: int main();
    5: {
    6: cout <<"Hello World!\n";
    7: return 0;
    8: }

    Will this work in Microsoft Visual C++? I have tried it but it didn't work. Can you guys pls help me?
    There is a semicolon after the main() that shouldn't be there. That's probably what is wrong.
    Alcohol & calculus don't mix.
    Never drink & derive.

  23. #23
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    I just got C++ How to Program by Deitel and Deitel and i HIGHLY recommend it. I have learned more from this book in a few days than months with help files and tutorials! If you want to learn c++, i recomend putting out the extra $$$ and getting this book!

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width