2 Years
Discussion Span
Last Post by Sarkurd

There are many many ways, and in my opinion most depend on why you want to learn C++.

If it is career learning then I would suggest you look for a class at a local college or school.

If it is for hobby then I would suggest you search web for tutorials.

I used http://www.learncpp.com/ a lot, but there are many more.

Understand that these are just two suggestions and there are other options such as online classes etc...

Edited by Suzie999


C++ == C with classes.

The key here are "classes" - this is a critical part of object-oriented programming (OOP). OOP allows much better modelling of real-world constructs than do "traditional" functional programming constructs do. An object is an instance of a class, which contains member data (values specific to the instance), and methods to operate on the instance and its members. Here is a "trivial" example:

struct date {
    unsigned year;
    unsigned month;
    unsigned day;

class person {
    // Member variables here.
    std::string m_name;
    std::string m_address;
    date m_dob; // Date of birth.
    person();   // Declaration of a person - implemented in person.cpp
    person( unsigned DOByear, unsigned DOBmonth, unsigned DOBday )
    { setDOB(DOByear, DOBmonth, DOBday); }
    person( const person& cpy ); // copy constructor (make clone) - see above.
    person& operator=(const person& rhs); // Makes one person a clone of another.

    void setDOB( unsigned year, unsigned month, unsigned day ) // Sets date of birth
    { m_dob.year = year; m_dob.monnth = month; m_dob.day = day; }
    std::string getDOB(); // Returns date-of-birth as a string in YYYY/MM/DD format.

This is a very simple (and not really great) example of using C++ to writing OOP code.


C++ is very easy and comfort language if we well know in C.
To more about this language study or practice more about c and u will be best developer in c++ developer.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.