Computer Science, asked by legend1943, 24 days ago

write the restrictions on overloaded functions​

Answers

Answered by Write2nishamalik
1

Answer:

Plz mark as brainliest

Explanation:

Restrictions on overloaded functions (C++ only)

You cannot overload the following function declarations even if they appear in the same scope. Note that this list applies only to explicitly declared functions and those that have been introduced through using declarations:

Function declarations that differ only by return type. For example, you cannot use the following declarations:

int f(); float f();

Member function declarations that have the same name and the same parameter types, but one of these declarations is a static member function declaration. For example, you cannot use the following two member function declarations of f():

struct A { static int f(); int f(); };

Member function template declarations that have the same name, the same parameter types, and the same template parameter lists, but one of these declarations is a static template member function declaration.

Function declarations that have equivalent parameter declarations. These declarations are not allowed because they would be declaring the same function.

Function declarations with parameters that differ only by the use of typedef names that represent the same type. Note that a typedef is a synonym for another type, not a separate type. For example, the following two declarations of f() are declarations of the same function

Answered by brainlyun
2

Answer:

Use of typedef names No

Unspecified array bounds No

const or volatile Yes, when applied to entire function

Ref-qualifiers Yes

Explanation:

Similar questions