Computer Science, asked by saishaileshshetty, 8 months ago

Define const object. How it is declare​

Answers

Answered by drmalik021
1

Answer:

A const object is defined the same for a user-defined type as a built-in type. For example: const int i = 1; const blob b(2); ... If you declare a member function const, you tell the compiler the function can be called for a const object.

Answered by Breezywind
6

Explanation:

Const member functions in C++

Like member functions and member function arguments, the objects of a class can also be declared as const. ... A const object can be created by prefixing the const keyword to the object declaration. Any attempt to change the data member of const objects results in a compile-time error.

HOPE IT HELPS YOU

PLZZ MARK ME AS BRAINLIEST

PLEASE MARK ME..........

Similar questions