Moving form c to c++

This is a discussion on Moving form c to c++ within the C++ Programming forums, part of the General Programming Boards category; Hello everybody! In the past months I acquired good C programming skills and now I'd like to make a step ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    100

    Moving form c to c++

    Hello everybody!
    In the past months I acquired good C programming skills and now I'd like to make a step further and learn well C++ (if possible using MS Visual C++ environment).. I can already program Java (althought I cannot consider myself an experienced Java programmer).
    My question is: in the jungle of books and tutorials available online and in bookshops, which could be, in your opinion, a good (and above all fast) path to be followed by people in my conditions?

    Many thanks for any suggestion you'll give me!
    Bye!
    /* NO COMMENT */

  2. #2
    Student legit's Avatar
    Join Date
    Aug 2008
    Location
    UK -> Newcastle
    Posts
    156
    The very first time I got into programming was with the QBasic language, which isn't very well heard of now. I used tutorials online and no books. During these tutorials, alot of C++ was mentioned on the side or links leading to C++ sites. So I took the hint and found this site, which I use often. I went out and bought a book with an accompanying Dev C++ compiler, which started me off. I then purchased a book not long after titled: SAMS TEACH YOURSELF C++ IN 21 DAYS. I still learn from this book now, in fact, i'm reading it at this very moment! I highly reccomend it, but you can also look at the book recommendations on this board, and the programming links which direct you to tutorials. If you know C, then you know most of C++.

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,014
    Quote Originally Posted by legit View Post
    ...If you know C, then you know most of C++.
    No, unfortunately, you don't.
    You know the C subset of C++ which is rarely (or at least should not be) used in modern C++ programs.
    The syntax is mostly the same, though.

    Anyway, the compiler doesn't matter - Visual C++ or Dev-C++ - it's all fine. For good books, I cannot recommend more than looking at the books thread that's pinned on the board.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I guess that Legit and Elysia are pointing out that there are two aspects of C++:
    1. Object oriented programming and use of existing objects from libraries.
    2. The language features in themselves.

    By knowing C, you know a fair bit of #2 in the list above. You do not (unless you have been using C in a very advanced way) know much about #1 - but if you have been using Java, then you should at least grasp the fundamentals of objects and how to use those to achieve something.

    #1 in the list above is also the much harder bit to learn.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,014
    Except for the whole OO bit - there is one another advanced area of C++ that C does not have, and that is generic programming with templates.
    These two bits make up quite a bit of the language. Template programming isn't as common, though, I suppose, but it is one of the most powerful features of C++ that many library writers try to master.

    And aside from that, C++ thinking is much different from that of a C programmer, so there's a lot to learn.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Elysia View Post
    And aside from that, C++ thinking is much different from that of a C programmer, so there's a lot to learn.
    Yes, that's what I tried to say in #1 - Object Oriented programming uses a completely different mindset than standard C programming [at least if you do either as they were intended to be used - it is entirely possible to use C++ as a "bigger, beefier" version of C, but that is not using the language to it's best advantage - and I have seen object oriented code written in C, but that is REALLY hard work for the programmer].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reopening a form ?
    By Aga^^ in forum C# Programming
    Replies: 1
    Last Post: 02-11-2009, 09:28 AM
  2. Calling datas from another form?
    By Aga^^ in forum C# Programming
    Replies: 2
    Last Post: 02-06-2009, 02:17 AM
  3. Accessing main form from functions in other classes
    By pj_martins in forum C++ Programming
    Replies: 1
    Last Post: 11-05-2004, 09:27 AM
  4. My UserControls dissapear off my form
    By zMan in forum C# Programming
    Replies: 2
    Last Post: 09-15-2004, 09:55 AM
  5. Making an MFC form to suit
    By TJJ in forum Windows Programming
    Replies: 1
    Last Post: 04-17-2004, 12:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21