Page 1 of 1

Executable !

Posted: Fri Apr 27, 2018 11:46 am
by sarmednafi
Richard,

Those files we can be embedded into one executable file of our program, can we embed a file with data that we write, changed or deleted, and we will find our data next time we run the program, we will find it updated? Or it is better not to embed data file into our executable?

Regards,
Sarmed

Re: Executable !

Posted: Fri Apr 27, 2018 12:50 pm
by guest
sarmednafi wrote: Fri Apr 27, 2018 11:46 am next time we run the program, we will find it updated
Yes, when you next run the program it will replace the file with the original embedded version, and any changes will be thrown away!

The best thing to do is to embed an 'initial' ('default') data file, then when the program runs it can check whether a 'user' data file exists: if not it should create a new file by copying the embedded file. If the 'user' data file does exist, it is left unchanged.

Richard.

Re: Executable !

Posted: Fri Apr 27, 2018 3:02 pm
by sarmednafi
GOOD,

Thanks.