Monday, May 24, 2010

C++ and OOP?

I already know C programming. I want to learn Data structures and Algorithms using C++.


So how should i start to learn?


Find two difference courses for C++ and Data Struc and algo?


OR first learn C++ well ??

C++ and OOP?
I suggest you learn C++ first. The simple reason is you can write C now, then learn how class and object work in C++, how to design class in C++, how public and private work. C++ is not difficult, you can understand it shortly if you have a lot of flying hour in C and know which part of C++ to focus at the first time.





I suggest you don't learn C++ deeply in theory but you should learn in wide. That's mean learn how to design and how to work with class. At the first time you touch C++. Don't interest in OOP theory much. Try to understand class and object, overloading, constructor and destructor.





The topics of C++ you should keep them out at the first time you learn C++ are:


- What is the meaning of Inheritance?


- What is the meaning of each OOP words such as Polymorphism etc…


- All meaning of OOP word.





You can understand C++ and how class and object work by writing and applying your C++ class in real example. My students, I found many of them read many books of C++ and requested me to give an example of Polymorphism at the first period they learned C++.





After that, learn Data Structure, class in C++ is more flexibility than using "struct" in C. You can have inside procedure using private and make functions to be public for to be called by class user.





My C++ learning style starts from “struct” and the change to “class”, then learn how public/protect work and then constructor and destructor and so on…





By the way, my solution may not be applied to everyone who learns C++. But it is just suggestion from my teaching experience.
Reply:The best way to learn is to buy a book. Check out your local book store.


If you want to learn specific programming topics, you should Google search for it.


There might be some online tutorials and sample code.


You also need to learn about the operating system that you're programming for. Microsoft and Borland offer an OOP framework with their free Windows compilers, but you can also program Windows with C/C++ without OOP (the better choice).
Reply:Learn C++ first. C++ is a lot different from C.
Reply:I don't quite understand your question, what else is there to a program than the data structures and algorithms. If you learn strong C++ you will learn lots of data structures and algotithms. I suggest learning C++ and then the data structures and algorithms.





I highly reccomend "C++ How to Program" by Deitel and Deitel

medium

No comments:

Post a Comment