C,C++ and C#?

Zorthgo

Joined Oct 22, 2008
3
Biggest difference between C and C++ is that C is a Structured Programming language and C++ is an Object Oriented Programming language.

Microsoft has defined C# as follows:

"C# is a simple, modern, object oriented, and type-safe programming language derived from C and C++. C# (pronounced 'C sharp') is firmly planted in the C and C++ family tree of languages, and will immediately be familiar to C and C++ programmers. C# aims to combine the high productivity of Visual Basic and the raw power of C++."

Basically C# was developed to work with the .NET platform.

You can find out more information here: http://www.itgatewaysolutions.com/articles/CPlusAndCSharp.htm
 
Last edited:

Thread Starter

Sonoma_Dog

Joined Jul 24, 2008
99
Great. Thanks !
I have heard these two words a lot "object Oriented". What is it mean?
is it mean it can handle GUI?

I am a Electrical engineering student, have very less experience with programming, I have only done some micro controller programming in C.

Thanks again. I will read up some of those links when i got time.
 

Mark44

Joined Nov 26, 2007
628
Great. Thanks !
I have heard these two words a lot "object Oriented". What is it mean?
is it mean it can handle GUI?

I am a Electrical engineering student, have very less experience with programming, I have only done some micro controller programming in C.

Thanks again. I will read up some of those links when i got time.
"Object oriented" doesn't have anything to do with GUI. C is a procedural language, which means a programmer writes functions to do whatever is supposed to get done in an application. An object-oriented language such as C++, Java, C#, Eiffel, or SmallTalk, on the other hand, defines a collection of objects, each with its own methods (things it can do) and properties (things that describe it).

When an object is designed, some thought is (or at least is supposed to) put into creating all of the methods that the object will need. One impetus behind object-oriented programming (OOP) is a tighter connection between the problem domain and the world of the programmer who has to provide a solution. As a simple example of how OOP might be used is for a dictionary-type data structure, a collection of term-definition pairs. The things a dictionary object should be able to do include add or delete a new word and its definition in such a way that it can easily be found, and search for a given word to find its definition.

A more complicated example might be modeling the customers of a business, such as a bank. Each customer would have properties, such as name, one or more accounts (checking, savings), and could be expected to make transactions such as deposting money to an account, withdrawing money from an account, and so on.
 

bloguetronica

Joined Apr 27, 2007
1,541
Simply said, an object is a variable or set of variables with functions associated to it.

For example, you have an object "Colour", that is a set of three bits red, greed, blue, and you have various operations that you can do with colours (for example, to calculate the hue or mix two colours). Those operations are the functions associated with the object of type "Colour".

C is a procedural language, that is, you have functions and procedures, but unlike C++, you can't associate procedures with variables, and thus, you can't create objects. With C++, you can create objects, and still use generic procedures as you would use in C. C can be considered a C++ subset.
 
Top