CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2006
    Posts
    6

    I'm new in C++, where to start from ?

    Hey all,
    I am new at c++, but I have a plan to learn it. Here is my question: where to start from ?
    Have you any articles or smth?

    Any help is welcome

  2. #2
    Join Date
    Apr 2005
    Location
    Norway
    Posts
    3,934

    Re: I'm new in C++, where to start from ?

    Maybe you can start with a book?

    C++ General: What are good books about C++ ?

    - petter

  3. #3
    Join Date
    Jun 2006
    Posts
    16

    Re: I'm new in C++, where to start from ?

    www.cplusplus.com is a nice site to start.

    www.vtc.com however helped me ALOT, it has online bideo courses on many languages INCLUDING C++.

    www.pscode.com - Great for C++ code samples.

    http://pscode.com/vb/scripts/ShowCod...=9889&lngWId=3 - My tutorial on C++. Made a small mistake but fixed it. Im sure it'll help, has some nice ratings too.


    If you are willing to pay a little price, check out www.3dbuzz.com and buy the C++ VTM videos. They take you from your first C++ programs. all the way to creating games and using classes pretty deeply.

    Some books:
    beginning C++ - Ivor Horton
    C++ Programming Language 3rd edition - Bjarne Stroustrup(C++ creator)

  4. #4
    Join Date
    Jun 2006
    Posts
    6

    Re: I'm new in C++, where to start from ?

    Alright, thanks alot, but here is another question: where I have to write the code?
    Can you suggest me some programs.

    //Edit

    Already got one (Dev-C++)
    Last edited by Burtin; June 21st, 2006 at 01:10 PM.

  5. #5
    Join Date
    Jun 2006
    Posts
    3

    Re: I'm new in C++, where to start from ?

    Dev-C++ is all you really need. It's a very nice program - I'm definetly going to donate to them.

    Also let me recommend a book: Sams Teach Yourself C++ in 21 days. Don't let the name scare you, this is NOT a typical (read: crappy) sams teach yourself book. It's about 950 pages and starts out at the most basic level. It is a very well done book.

    I have a lot of OO experience with .NET and Java, but was clueless in C++. I skipped most of the first week with the exception of classes. But again it's a very good book and goes very in depth.

    G/L!

  6. #6
    Join Date
    Jun 2006
    Posts
    6

    Re: I'm new in C++, where to start from ?

    Well, I made a little program, but I would like to know couple of things.

    Here is my program
    Code:
    #include <iostream.h>
    int main()
    {
    float a, b;
        cout<<"Enter voltage: ";
        cin>>a;
        cout<<"Enter amperage: ";
        cin>>b;
        cout<<"---------------------------------------\n\n";
        cout<<"Power: ";cout<<a*b;cout <<"W";
        system("pause");
        return 0;
    }
    Well, I want to put this program to repeat, not to terminate it after the first calculation. And how can I enter line breaks, I want to put the message "Press any key to continue" below. P.S - I can't use \n to do this.

    Hope you understand

  7. #7
    Join Date
    Apr 2005
    Location
    Norway
    Posts
    3,934

    Re: I'm new in C++, where to start from ?

    Quote Originally Posted by Burtin
    I want to put this program to repeat, not to terminate it after the first calculation
    You can use a do-while loop:
    Code:
    do
    {
        cout<<"Enter voltage: ";
        cin>>a;
        cout<<"Enter amperage: ";
        cin>>b;
        cout<<"---------------------------------------\n\n";
        cout<<"Power: ";cout<<a*b;cout <<"W";
    } while (some condition here);
    Quote Originally Posted by Burtin
    And how can I enter line breaks,
    '\n' like you've already done. Or you can use std::endl :
    Code:
    std::cout << "Hello there" << std::endl;
    In addition to creating a newline, std::endl will also flush buffered data.

    - petter

  8. #8
    Join Date
    Jun 2006
    Posts
    6

    Re: I'm new in C++, where to start from ?

    Thanks.

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

Featured