my code is messed up says the compiler
here it is
Code:
#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
#include <dos.h>
#include <string.h>
#define PROG_NAME "se"
//variables
char message[1000];
//functions
void encypt ();
void decrypt ();
char EncryptChar ();
void EncryptString ();
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::code starts here
char EncryptChar(char ch)
{
if (ch == 'Z')
{
return 'A';
}
if (ch == 'z')
{
return 'a';
}
return ch + 1;
}
void EncryptString(char *str)
{
while (*str != '\0')
{
*str = EncryptChar(*str++);
}
}
void encrypt()
{
cout<<"Enter Message to Encrypt:"<<endl;
cin.getline(message, 1000, '\n');
EncryptString(message);
}
void decrypt()
{
cout<<"Error"<<endl;
}
int main(int argc, char* argv[])
{
//Command line arguements =)
if(argc != 3)
{
cout<<"Error, Bad Input.";
return 0;
}
if(argv[2] == '-')
{
if((argv[3] == 'e') || (argv[3] == 'E'))
{
system("cls");
encrypt();
}
else if((argv[3] == 'd') || (argv[3] == 'D'))
{
system("cls");
decrypt();
}
else
{
cout<<"Error Bad Input, Read the ReadMe File"<<endl;
return 0;
}
}
else
{
cout<<"Error Bad Input, Read the ReadMe File"<<endl;
return 0;
}
return 0;
}
im useing bcc 5.5 it says:
69: Cannot convert 'char' to char *' in function main(int, char * *)
72:same thing as above
72:Same thing
77:same thing
77:same thing