Solved

C and C++

Posted on 1997-11-12
1
176 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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
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…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now