IT. Expert System.

C++

mutable


Used to specify that it is a data field that can be modified even if another part of the data is declared const

Syntax:
Syntax doesn't exist.


Example:

#include 
#include 
using std::cout;
using std::endl;
 
class Customer
{
    char name[25];
    mutable char placedorder[50];
    int tableno;
    mutable int bill;
public:
    Customer(char* s, char* m, int a, int p)
    {
        strcpy(name, s);
        strcpy(placedorder, m);
        tableno = a;
        bill = p;
    }
    void changePlacedOrder(char* p) const
    {
        strcpy(placedorder, p);
    }
    void changeBill(int s) const
    {
        bill = s;
    }
    void display() const
    {
        cout << "customer name is: " << name << endl;
        cout << "food ordered by customer is: " << placedorder << endl;
        cout << "table no is: " << tableno << endl;
        cout << "total payable amount: " << bill << endl;
    }
};
 
int main()
{
    const customer c1("pravasi meet", "ice cream", 3, 100);
    c1.display();
    c1.changeplacedorder("gulabjammuns");
    c1.changebill(150);
    c1.display();
    return 0;
}


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 110 / . Delta: 0.02374 с