I know it’s been a while but the question has a clear answer: a text file is nothing more than a sequential of characters. So, does not have any feature that allows doing anything other than storing such character sequences which can be read perfectly by any programs.
The exception, not to say that there is no, gets the permission read/run/write files according to users of a device or application, where each user sends and unmails in their own files. For example: [email protected] does not read emails from [email protected] unless it allows it. But this file management is another completely different theme and that does not apply to the case.
To achieve your goal, you can follow one of the suggestions that you were given in the question: from creating a ZIP (or equivalent) with the plain text file. Of course it would not be as trivial as simply manipulating a simple text file.
Another alternative is to create your own file template with its encryption. Thus, only your program could decrypt
Have a similar question on Soen. The suggestion was to compress to (
.zip
for example) and then lock with a password, might help ;)– Tuxpilgrim
I think all solutions go through encryption. It can be an encrypted file, an encrypted zip containing the file, a folder or an encrypted drive, etc.
– Victor Stafusa
Is there any way I can create a . Read-only TXT directly from Devc++? Maybe this will help me with what I want to do
– DivinSphere
@Divinsphere: I see no other way to do this reliably and effectively without the use of some cryptographic algorithm. By the way, what is your intention to do such a thing ? You already know the XY problem ?
– Lacobus
I developed a questionnaire in C that can read Questions by Notepad, ie any lessoa can create questions and put in the program to answer, Type A Million Show with Questions nl Notepad, I made here a system to encode the notepad and I think I’ll have to settle anyway, we create questions in the notepad uses the program to encode and then just drag that the program decodes and starts the game
– DivinSphere
It is a game of questions and answers that any person could create their questions and send to other people to answer, With this coding that I have done for now is even quiet to use, but now my college professor asked me if I could do to store the score and enrollment of the person online, Now another challenge for me kkk have no idea how to use online in C xD
– DivinSphere
I’ll settle for coding the same content and try to see something with Online on C to try to make scoring system but thanks for all/ I don’t even know if C has anything on online kk
– DivinSphere