Skip to main content
gamedev.net
🔒 Locked

Encryption problems

Started by demonrealms May 19, 2003 at 2:45 PM 3 replies 600+ views
Original Post
demonrealms
demonrealms
Hey, I typed in
  
else if(ipt1 == a_l)
	{
		cout << "File name: ";
		cin.getline(file.fdes, 180);
		EncryptFile(file.fdes);
		cout << "Encrypted." << endl;
		return(main());
	}
  
And it never encrypted the file I wanted it to encrypt. It just stayed the same. What am I doing wrong?
Vich
Vich
Perhaps it should be:
EncryptFile(file);
instead of:
EncryptFile(file.fdes);
??

If not, we''ll need more code to give you a proper answer.

"My basic needs in life are food, love and a C++ compiler"
[Project AlterNova] [Novanet]
[www.LifeIsDigital.net - My open source projects and articles.
ApochPiQ
ApochPiQ
Where is the EncryptFile coming from? Is it your own code, a library function, or what?

Also, why are you calling main() at the end of that block? There may be a good reason, but in most cases that''s asking for a lot of pain.
demonrealms
demonrealms
Well I can''t give the whole program code.(it takes up 1234 lines)
But the file.fdes is a class called file, then in it theres a char fdes in the class named file. So that''s why it''s file.fdes
Second: return(main()) is there b/c it goes back the main part of the program instead of just qutting after that line of code.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.