0

Can we make a c++ code password protected?

18th Mar 2017, 3:12 AM
Arpit Saini
Arpit Saini - avatar
2 odpowiedzi
+ 3
Yeah why not. You can do something like this - char pass [5]; cout <<"enter password"; for ( int I = 0 ; I < 5; I ++) pass[I] = getch (); if (pass = "yourp") // then start your program else // display error message or exit
18th Mar 2017, 5:40 AM
Ramjivan Jangid
Ramjivan Jangid - avatar
0
when we open a .cpp or .c file through terminal in Ubuntu, can we make terminal to ask password to open it?
18th Mar 2017, 4:29 AM
Arpit Saini
Arpit Saini - avatar