Encryption Decryption Review Needed

Hello i made 2 programs to encrypt a .txt called lol.txt in my C:\ and one that decrypts lol crypt.txt made by the encryptor. Wat i used to make the text non readable to human's was just converting each charcher to its Oct ascii value (really simple but it is a beginning)

now i finaly made the 2 programs do thier jobs and i want to know if my code is good or that some things could be improved. The reason why is because i just dont really know how good code looks like. This is my first program and it does wat it needs to.

so pleas review my source's

the encryptor

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include<iostream>
#include<fstream>

using namespace std;

int main()
{
	ifstream fsI("C:\\lol.txt");
	while(fsI.good())
	{
		ofstream fsO("C:\\lol crypt.txt",ios::app);
		fsO<<fsI.get()<<'.';
		fsO.close();
	}
	fsI.close();

	system("pause");
	return 0;
}


the decrypter ( it doesnt make a text file but show's the decrypted text in its cli

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include<iostream>
#include<fstream>
#include<sstream>
#include<string>
using namespace std;


string sss;
int main()
{
	ifstream fsI("C:\\lol crypt.txt");

	while(fsI.good())
	{
		if(fsI.peek()!='.')
		{
			char i=fsI.get();
			sss=sss+i;
		}
		else
		{
			fsI.ignore();
			if(sss!="255"&&sss!="254"&&sss!="-1"&sss!="0")
			{
				istringstream is(sss);
				int ib;
				is>>ib;
				char ic;
				ic=ib;
				cout<<ic<<endl;
			}
			
			sss="";
		}
	}
	fsI.close();
	system("pause");
	return 0;
}


pleas comment i want to learn !
I probaly said some forbidden word's in the title...
Topic archived. No new replies allowed.