how can set a password for a file in linux using c/c++
Welcome to TSDN.
Good Idea!
Best of Luck.
Now look, this is System Level Programing.
I think the Unix will not provide you the API for it.
You have to do it from the System Level.
Then one thing you need that you have to know about the Password Encryption and in which File the Password stored and one more thing are you permitted to write on that File.
I think you understood me.
Again, Best of Luck with your Code.
If there is any problem then come here with your Specific Problem, Experts are here to lead you to right direction.
Kind regards,
Dmjpro.