Can we declare a const variable only once and then use it in same exe whenever it runs?

  • Thread starter Thread starter Shahzaib17
  • Start date Start date
S

Shahzaib17

Guest
i am curious is there any way by which i declare a global constant variable and then change it only once when the .exe of my cpp code is ran for first time.

This const variable is suppose to store the time of first run time of exe and then never change it and store it permanently and use this value whenever that const variable is accessed by any where in the code?

if its not possible is there any other way without using .txt files to store the first run time of my exe because that won't be suitable at all user

plus i don't want to store this info in database of any kind

Continue reading...
 
Back
Top