Solved

C and C++

Posted on 1997-11-12
1
182 Views
Last Modified: 2010-04-10
1. Basic instruction for C and C++ languages.
2. What's the same between C and C++, including examples between this two.
3. What is pseudocode?
4. What's the different C and C++ algorithm?
thanx..
0
Comment
Question by:norisha
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 100 total points
ID: 1173105
First c++ comprises c but have more features c doesn't have.
Base unit of c++ is class, The nature of class as follows. First 32 bits are pointer to virtual table(vtable).Each element of the vtable is pointer to virtual function. When one class derived from another derived class is built so that first goes pointer to vtable then base class data and then derived class data. Derived class uses the same pointer to vtable but can replace some elements(pointers to virtual functions) so overwrite these functions. This is main advance of c++ - inheritance and polimorphism which leads to ability to write reusable code.
c++ is object oriented language but c is procedural oriented language. c++ class which describes the object defines its data as public which are accesible by outside world and represent object to outside world, protected which are restricted data and private used by object itself only. c structure has public members only. In c you create eachprocedure for each action in c++ you create each class for each object inhereting such class from similar objects thus reusing features which are common to these objects.  
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question