hello there guys! i am here to talk about what i think is the const is.
so in the variable class the sir told me that int a = 4,is a variable.why is that i thought and i found the answer in the next class.so i think that the const is the opposite of a variable which is a “constant”.This is just my thoughts and i am not sure yet.
special thanks to all the teachers helping me improve in my c++ coding classes.i am very excited to complete the first project and move on to the next projects.
const
in C++ creates a static variable with a non-modifiable value. It tells the compiler that throughout the life of that program the value shouldn’t change.
You can read more here (Also check the example provided there):
https://docs.microsoft.com/en-us/cpp/cpp/const-cpp?view=vs-2019