I wanted to know what const does? According to the tutorials, I realized that the line of code is immutable. Now my question is, where does it become immutable? In the program that opens? Or does it mean coding itself?
And look at the following code that I am writing ...
When I change the variables a, b, c to 4, 6 and 9 and below a, b, c, a line is drawn and the program cannot be compiled ...
I want to understand exactly what the use of this const is in, for example, a game or program ...
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
const int a = ۲;
const int b = ۵;
const int c = ۳;
a = ۴;
b = ۶;
c = ۹;
const int sum = a + b + c;
cout << sum << endl;