This is a discussion on C and C++ differences within the C and C++ Programming forums, part of the Software Development category; What are the difference of C and C++? Is it a good idea for me to learn even just the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, The C++ is the advanced version of C language. I can just give you the sample program to understand the main difference between C and C++. The main different in C++ is the OOPS concept in it. OOPS is nothing but Opject Oriented Programming Structure. The C Language is function oriented programming. Using this language there are lot of drawbacks, the main drawback is data security. Whereas in C++, the data will be based on the class & object oriented. For example in C. maint () { int c; } where as in C++ class Sample:: private { private: int c; } Sample sObject; print sObject.c; from the above sample program, you can understand how the variable "c" is secured by using in C++ language. If the class is declared as private it will be available only in the scope of declaration part. C++ allows the programmer to create classes, which are somewhat similar to C structures. However, to a class can be assigned methods, functions associated to it, of various prototypes, which can access and operate within the class, somewhat like C functions often operate on a supplied handler pointer. Although it is possible to implement anything which C++ could implement in C, C++ aids to standarize a way in which objects are created and managed, whereas the C programmer who implements the same system has alot of liberty on how to actually implement the internals, and style among programmers will vary alot on the design choices made. Another one important thing is, Data Encapsulation. Data encapsulation, sometimes referred to as data hiding, is the mechanism whereby the implementation details of a class are kept hidden from the user. The user can only perform a restricted set of operations on the hidden members of the class by executing special functions commonly called methods. The actions performed by the methods are determined by the designer of the class, who must be careful not to make the methods either overly flexible or too restrictive. This idea of hiding the details away from the user and providing a restricted, clearly defined interface is the underlying theme behind the concept of an abstract data type. Hope you can carry on with any programming language which are implemented with OOPS concept, will be very useful. thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention |
| |||
| C++ is an extention to C to support Object Oriented Programing. There are some subtle differences beside that, but all of them are there to support OOP the best. I would say you should start learning programming with Java, because Java is the only language that will require from you to program right. Then, when you move to C/C++ you'll have much less bugs in your code |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Differences between a C++ struct and C++ class | vijayanand | C and C++ Programming | 0 | 09-21-2007 03:35 AM |
| Can anybody explain about the differences between dataset.clone and dataset.copy? | kingmaker | C# Programming | 2 | 08-28-2007 12:22 AM |
| Can anybody tell me Browser Differences in window.opener Behavior | kingmaker | HTML, CSS and Javascript Coding Techniques | 2 | 07-24-2007 12:52 AM |
| differences between DIV and SPAN tag | sivakumar | HTML, CSS and Javascript Coding Techniques | 1 | 07-11-2007 03:39 AM |