answersLogoWhite

0


Best Answer

A class is a type while an object is an instance of a class. This can be likened to the way in which an int is a type while an int variable is an instance of an int:

int x; // x is an instance of int type.

myClass c; // c is an instance of myClass type.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

members defined in structures are public by default and in class its private.

class can have member functions which operate on those data members but structures have only data members

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Technically there is no difference. You're simply providing new implementations for existing functions or operators. However, all operators are built-in; you cannot create new operators, you can only overload those that already exist. Functions, on the other hand, need not be built-in, thus you can overload user-defined functions as you see fit.

This answer is:
User Avatar

User Avatar

Wiki User

16y ago

A function is a paragraph of code in which the program will perform a specfic task. A class is a graph of functions that can be shared by many applications.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between function and operator overloading in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How can user defined operator overloading harm the readability of the program?

Because the built in operator has the precision and compiler knows all the precision between the operators, and it works on that precision. User can also create its own operator but the compiler does not come to know thow to make precision of this operator. Therefore we dont use user defined operator


Major c plus plus feature that were removed from java?

Several features that they either made unsafe programs or hard-to-read programs were removed. Some of the features removed include operator overloading; pointers; implicit conversions between numeric and boolean; multiple inheritance.Several features that they either made unsafe programs or hard-to-read programs were removed. Some of the features removed include operator overloading; pointers; implicit conversions between numeric and boolean; multiple inheritance.Several features that they either made unsafe programs or hard-to-read programs were removed. Some of the features removed include operator overloading; pointers; implicit conversions between numeric and boolean; multiple inheritance.Several features that they either made unsafe programs or hard-to-read programs were removed. Some of the features removed include operator overloading; pointers; implicit conversions between numeric and boolean; multiple inheritance.


What are the similarities between constructor overloading and function overloading?

The only similarity is that both constructor and function overloads are distinguished by their signature -- the number and type of their arguments. Functions differ in that they also have a return type, which is also part of the signature, whereas constructors have no return type, not even void.


What are the differences between Java OOP and PHP OOP?

JAVA is an Object Based Programming Language. it doesn't provide multiple inheritance and operator overloading. while Object Oriented Lanuages provides both.


Difference between sizeof and strlen?

The sizeof operator returns the total size, in bytes, of the given operand, whereas the strlen function returns the number of characters in the argument up to but not including the first null-terminator.Consider a character buffer allocated 50 bytes to which you assign the string "Hello world". The sizeof operator will return 50, but the strlen function returns 11.

Related questions

Difference between new operator and operator new?

new operator allows to allocate a memory from the heap..... so a new instance of a class is created.......... but operator new is used to overload the (new) operator........ juast like overloading of other operators


Distinguish between operator overloading and function overloading?

in C++ there is no real difference as operators are overloaded by implementing them as functions. However, while we differentiate between function overloads by the function signature (the number and type of parameters), operator overloads are distinguished only by the parameter types. The parameters are interpreted as operands, and the number of operands will depend upon whether the operator is unary, binary or ternary. That is, for any given operator, the number of operands will be the same for each overload you implement. The only exceptions are the unary increment (++) and decrement (--) operators as they each have postfix and prefix variants. In order to differentiate their signatures, an unreferenced or dummy parameter must be passed to the postfix variants.


difference between object and oriented program?

JAVA is an Object Based Programming Language. it doesn't provide multiple inheritance and operator overloading. while Object Oriented Lanuages provides both.


Is there is any difference between -algebra and operator algebra?

Only the word "operator"


What is operator function?

An operator function implements a particular operator symbol. The database server provides special SQL-invoked functions, called operator functions, that implement operators. An operator function processes one to three arguments and returns a value. When an SQL statement contains an operator, the database server automatically invokes the associated operator function. The association between an operator and an operator function is called operator binding. You can overload an operator function to provide the operator for a UDT. The SQL user can then use the operator with the UDT as well as with the built-in data types. When an SQL statement contains an operator, the database server automatically invokes the associated operator function.


What is the difference between over-loading and over-riding in cpp?

Overloading and overriding do similar things but they are distinct. When you override a function, you are providing a new implementation of a function that was inherited from a base class. The signature of an override must be covariant with the base class signature. Overloading means to create several functions with the same name within the same namespace but with different signatures.


How can user defined operator overloading harm the readability of the program?

Because the built in operator has the precision and compiler knows all the precision between the operators, and it works on that precision. User can also create its own operator but the compiler does not come to know thow to make precision of this operator. Therefore we dont use user defined operator


Example of fundamental difference between a polynomial function and an exponential function?

fundamental difference between a polynomial function and an exponential function?


Major c plus plus feature that were removed from java?

Several features that they either made unsafe programs or hard-to-read programs were removed. Some of the features removed include operator overloading; pointers; implicit conversions between numeric and boolean; multiple inheritance.Several features that they either made unsafe programs or hard-to-read programs were removed. Some of the features removed include operator overloading; pointers; implicit conversions between numeric and boolean; multiple inheritance.Several features that they either made unsafe programs or hard-to-read programs were removed. Some of the features removed include operator overloading; pointers; implicit conversions between numeric and boolean; multiple inheritance.Several features that they either made unsafe programs or hard-to-read programs were removed. Some of the features removed include operator overloading; pointers; implicit conversions between numeric and boolean; multiple inheritance.


Is there any difference between operator and technician?

An operator is trained to use the equipment, the technician is trained to fix it


What are the similarities between constructor overloading and function overloading?

The only similarity is that both constructor and function overloads are distinguished by their signature -- the number and type of their arguments. Functions differ in that they also have a return type, which is also part of the signature, whereas constructors have no return type, not even void.


What is operand difference between operand and operator?

Simply defining, in an expression like A+B A is an Operand B is an Operand Plus is the Operator in between