this is the contenent of <cryptio.h>
when i include it in any main is declare errors !!!
please can you help me
Code:
#include <conio.h>
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include "fstream.h"
/************************* codation d'u caractere ****************************************/
char codec(char g)
{
int c;
c=(int)g;
if(c>=254){return(g);}
else
{
c++;
g=(char)c;
return(g);
}
}
/**************************** fin codation d'un caractere ****************************/
/*********************************** decodation d'un caractere **************************/
char decode(char g)
{
int c;
c=(int)g;
if(c>=254)
{return(g);}
else
{
c--;
g=(int)c;
return(g);
}
}
/********************************* fin decodation d'un caracterer ************************/
/**************************** decryptage d'un fichier ***************************/
void decrypte(fstream &T,char name[]) //pass the file stream to the function
{
// the method to read a file , that I ....
char chy,chn;
fstream file(name,ios::in|ios::out);
while(!T.eof())
{
T.get(chy);
if(chy==NULL){break;}
chn=decode(chy);
file<<chn;
}
file.close();
}
/********************** decryptage d'un fichier ****************************//********************************* cryptage d'un fichier *****************/
void crypte(fstream &T,char name[]) //pass the file stream to the function
{
// the method to read a file , that I ....
char chy,chn;
fstream file(name,ios::in|ios::out);
while(!T.eof())
{
T.get(chy);
chn=codec(chy);
file<<chn;
}
file.close();
}
/******************************* fin decryptage ********************************/