August 1st, 2002, 10:32 AM
Diff. b/w structured, Object Oriented and Visual Programming Languages.
This is a copy n paste of my earlier post that was a reply to a question about the difference between C and C++ and also about Visual C++ or windows programming. Its not exactly a tutorial but some information on C, C++ and Visual C++ that could be valuable for newbies learning these languages. Comments would be appretiated. So here it goes:
C is a Structured programming language. While C++ is an Object-Oriented Language. You can do a lot of stuff in C++ as compared to C.
Structured programming language i.e. C uses modules and functions that perform specific tasks like printing text, performing calculations etc. Functions make it easy for the programmer to divide his programs into a no. of tasks, thus making it easier to program. It uses the concept of divide and conquer. Functions can be either provided by the manufacturer of the compiler (pre-defined functions) or could be made by you (user-defined functions).
You can say that C is a go to less programming as it seldom uses go to statements. Most of the operations in C are done using the following constructs: Sequence, Selection and Repetition. Sequence is a step by step execution of program statements, Selection is the use of conditional execution like the well-known if statement (or functions in C) and Repetition is the repetition of a group of statements like in While statement and For statements.
Object-oriented programming languages (like C++) use the concept of re-usability of software or program components. You donít have to re-invent the wheel. It uses the concept of information hiding, inheritance and polymorphism.
Like in C, C++ mostly uses pre-defined functions. It uses classes to hold data and functions. Data are states of the classes and functions are behaviors of the classes. Functions present in a class manipulate its data. Objects are instances (or implementations) of classes.
Classes communicate with one another so they provide that data to other classes that is necessary and hide the rest of the info. It is much like driving a car without knowing its internal working.
Inheritance allows one class to inherit some properties like data and functions from other classes. The class that inherits is called sub-class and its parent class (from which other classes inherit) is called the super class.
Polymorphism is one interface but many implementations. You can do a lot of stuff by giving one command. I think thatís all you need to know about polymorphism at this moment.
For programming in Windows you will have to use Visual C++. However you will need to learn C++ to use VC++. In MS-DOS and LINUX based programming the C++ program calls the operating system to get the user input and in Windows based programming the OS i.e. Windows issues messages whenever a user inputs something e.g. mouse clicks and button press etc for all of these special messages are sent to the C++ program. The messages sent by Windows are mapped in the C++ programs to perform a specific task using a the data received from the OS.
I hope that this helps. If you have any doubts then donít hesitate to ask.
For more info about C language visit the site:
If u want to see online journals on C/C++ then visit:
With great power comes great responsibility.