1 / 8

Why convert from C to C++ ?

Why convert from C to C++ ?. What do we know?. The sky is blue Snow is cold. What do we know?. The sky is blue Snow is cold This girl is hot  AND... C++ supports object-oriented programming. What are the options?. Hide implementation details Reuse class code Reuse generic classes

Download Presentation

Why convert from C to C++ ?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Why convert from C to C++ ?

  2. What do we know? • The sky is blue • Snow is cold

  3. What do we know? • The sky is blue • Snow is cold • This girl is hot  AND... • C++ supports object-oriented programming

  4. What are the options? • Hide implementation details • Reuse class code • Reuse generic classes use a C++ class template and let the compiler do the work • Extend/Overload operators • Derive classes from base classes

  5. What are the options? • Avoid errors through function prototyping • Add parameters without changing function calls • Using safer, simpler I/O • Improve performance with fast inline functions • Overload function names

  6. Some remarks • Change involves effort Changes will be necessary!! • Massage C code into C++ extern “C” {...} • The hard part: designing objects ask what fundamental operations define each object • If it ain’t broke, don’t fix it!

  7. Count the butterflies or pose a question!

More Related