473,748 Members | 4,951 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

please help me correct the errors in this program.have to submit theproject tomorrow!!


#include<fstrea m.h>
#include<proces s.h>
#include<stdlib .h>
#include<conio. h>
#include<string .h>
#include<dos.h>
#include<ctype. h>
#include<stdio. h>
void setup()
void help();
void main(int argc, char *argv[])
char color[80];
ifstream clrs;
clrs.open("grap h.dsp");
if(!clrs)
{
cout<<"Importan t data file missing,will terminate";
getch();
exit(1);
}
for( int col=1;col<=11;c ol++)
{
clrs.getline(co lor,80);
textcolor(col);
for(int no=0;no<strlen( color);no++)
{
putch(color[no]);
delay(7.5);
}
cout<<"\n";
}

clrs.close();
textcolor(seven );
cprintf("");
cout<<"EnDe(enc ryptor-decryptor) version 3.0 for MS-DOS\n";
cout<<"<c2001 -R.G INFOTECH Ltd-project release";
unsigned long enc=5;
if(argc!=4&&arg c!=2)
{
help:
cout<<"\n Encryptor-Decryptor useage help:\n";
cout<<"syntax:\ n";
cout<<"\tEnDe <option<sourc e path and file<target path and
file>";
cout<<"\n\nOpti ons:\n";
cout<<"E :Encryption Mode\n";
cout<<"D :Decryption Mode\n";
cout<<"S :Delete Source file after Encryption\n";
cout<<"T :Delete Encrypted file after Decryption\n";
exit(0);
}
*argv[1]=tolower(*argv[1]);
if(argc==2)
{
if(!strcmp(argv[1],"setup")||!str cmp(argv[1],"setup")
||!strcmp(argv[1],"SETUP"))
{
char *p_set;
char set_check[8],setcheck[8],checkpass;
int length;
ifstream setup_pass;
setup_pass.open ("pass.end") ;
if(!setup_pass)
{
ofstream ofile;
ofile.open("pas s.end");
ofile<<"OE";
ofile.close();
ofile.open("end e.log",ios::tru nc);
ofile.close();
setup_pass.open ("pass.end") ;
}
setup_pass.get( checkpass);
setup_pass.getl ine(set_check,8 );
setup_pass.clos e();
setup_pass.open ("pass.end") ;
setup_pass.getl ine(setcheck,8) ;
setup_pass.clos e();
p_set=getpass(" enter your setup password: ");
int passlen=strlen( p_set);
length=atoi(set check);

if(passlen==len gth)
{
for(int pc=0;pc<=passle n;pc++)
set_check[pc]=set_check[pc]-69;
if(!strcmp(p_se t,set_check))
setup();
else
cout<<"incorrec t password";
exit(0);
}
else
if(passlen!=len gth)
{
cout<<"incorrec t password";
exit(0);
}
}
}
if(*argv[1]!='e'&&argv[1]!='d'&&*argv[1]!='s'&&*argv[1]+'t')
{
help();
}
char line,logout;
char *passw;
char *passc;
char pass1[8],pass2[8];
long =-1;
double size=1.0;
double per=1.0;
char ch;
int flag=0;
float fin;
int fin_i;
ifstream check;
ifstream ifile;
ifstream inlog;
ofstream pas;
ofstream ofile;
ofstream logfile;
logfile.open("t emp.log");
ifile.open(argv[2]);
if(!ifile)
{
cout<<"Error opening Source File,will terminate";
exit(0);
}
check.open(argv[2],ios::in);
ofile.open(argv[3],ios::nonreplac e);
if (!ofile)
{
cout<<"Error opening Target File,will terminate";
exit(0);
}
while(check)
{
check.get(h);
size++;
}
check.close();
if(*argv[1]=='e')
{
cout<<"Mode: Encryption\n";
error_e;
passw=getpass(" Enter Password: ");
pas.open("temp. pas");
pas<<passw<<"\n ";
passc=getpass(" Verify Password: ");
pas<<passc;
pas.close();
check.open("tem p.pas");
check.getline(p ass1,8);
check.getline(p ass2,8);
check.close();
system("del temp.pas");
if(!strcmp(pass 1,pass2));
{
logfile<<"\n\nE ncrypted "argv[2]<<"to"<<argv[3];
logfile<<"\nwit h password"<<pass w;
logfile.close() ;
logfile.open("e nde.log",ios::a pp);
inlog.open("tem p.log");
while(!inlog.eo f())
{
inlog.get(logou t);
logout=logout+5 00;
logfile<<logout ;
}
logfile.close() ;
inlog.close();
system("del temp.log");
i=strlen(passw) ;
for(long k=0;k<=i;k++)
{
passw[k]=passw[k]+500;
ofile<<passw[k];
}
while(!ifile.eo f())
{
ifile.get(line) ;
line=line+enc;
ofile<<line;
if(size<10000)
enc++;
fin=(per/size)*100;
fin_i=(int)fin;
cout<<"\r"<<fin _i<<"% Complete ";
per++;
if(size>10000)
delay(0.001);
else
delay(per);
}

cout<<"\r"<<"Fi le Encrypted";
ifile.close();
ofile.close();
}
else
if(pass2!=pass1 )
{
cout<<"Password Mismatch, Re Enter Password\n";
goto error_e;
}
}
if(*argv[1]=='s')
{
cout<<"Mode: Deletion of Soyrce Fleafter Encryption\n";
error_s:
passw=getpass(" Enter Password: ");
pas.open("temp. pas");
pas<<passw<<"\n ";
passc=getpass(" Verify Password: ");
pas<<passc;
pas.close();
check.open("tem p.pas");
check.getline(p ass1,8);
check.getline(p ass2,8);
check.close();
system("del temp.pas");
if(!strcmp(pass 1,pass2))
{
logfile<<"Encry pted"<<argv[2]<<" to"<<argv[3];
logfile<<"\nwit h password"<<pasw ;
logfile.close() ;
logfile.open("e nde.log",ios::a pp);
inlog.open("tem p.log");

while(!inlog.eo f())
{
inlog.get(logou t);
logout=logout+5 00;
logfile<<logout ;
}
logfile.close() ;
inlog.close();
system<"del temp.log");
i=strlen(passw) ;
for(long k=0;k,=i;k++)
{
passw[k]=passw[k]+500;
ofile<<passw[k];
}
while(!ifile.eo f())
{
ifile.get(line) ;
line=line+enc;
ofile<<line;
if(size<10000)
enc++;
fin=(per/size)*100;
fin_i=(int)fin;
cout<<"\r"<<fin _i<<"% Complete";
per++;
if(size>10000)
delay(0.001);
else
delay(per);
}
cout<<"\r"<<"fi le Encrypted";
ifile.close();
ofile.close();
char del[80]="";
strcat(del,"del ");
strcat(del,argv[2]);
system(del);
cout<<"\nFile Deleted";
}
else
if(flag!=0)
{
cout<<"Password Mismatch,Re Enter password\n";
goto error_s;
}
}
else
if(*argv[1]=='d')
{
cout<<"Mode:Dec ryption \n";
char *passw;
passw=getpass(" Enter Password:m ");
i=strlen(passw) ;
for(long k=0;k<=i;k++)
{
passw[k]=passw[k]+500;
ifile.get(line) ;
if(passw[k]!=line)
{
cout<<"Password Incorrect";
exit(0);
}
}
logfile<<"\n\nD ecrypted"<<argv[2]<<"to"<<argv[3];
logfile.close() ;
logfile.open("E nDe.log",ios::a pp);
inlog.open("tem p.log");
while(!inlog.eo f())
{
inlog.get(logou t);
logout=logout+5 00;
logfile<<logout ;
}
logfile.close() ;
inlog.close();
system("del temp.log");
while(!file.eof ())
{
ifile.get(line) ;
line=line-enc;
ofile<<line;
if(size<10000)
enc++;
fin=(per/size)*100;
fin_i=(int)fin;
cout<<"\r"<<fin _i<<"% Complete";
per++;
if(size>10000)
delay(0.001);
else
delay(per);
}
cout<<"\r"<<"Fi le decrypted";
ifile.close();
ofile.close();
}
if(*argv[1]=='t')
{
cout<<"Mode:del etion of encrypted file after decryption\n";
passw=getpass(" enter password: ");
i=strlen(passw) ;
for(long k=0;k<=i;k++)
{
passw[k]=passw[k]+500;
ifile.get(line) ;
if(passw[k]!=line)
{
cout<<"password incorrect";
exit(0);
}
}
logfile<<"\n\nD ecrypted"<<argv[2]<<"to"<<argv[3];
logfile.close() ;
logfile.open("E nDe.log",ios::a pp);
inlog.open("tem p.log");
while(!inlog.eo f())
{
inlog.get(logou t);
logout=logout+5 00;
logfile<<logout ;
}
logfile.close() ;
inlog.close();
system("del temp.log");
while(!ifile.eo f());
{
ifile.get(line) ;
line=line-enc;
ofile<<line;
if(size<10000)
enc++;
fin=(per/size)*100;
fin_i=(int)fin;
cout<<"\r"<<fin _i<<"% Complete";
per++;
if(size>10000)
delay(0.001);
else
delay(per);
}
cout<<"\r"<<"fi le Decrypted";
ifile.close();
ofile.close();
char del[80]="";
strcat(del,{:"d el ");
strcat(del,argv[2]);
system(del);
cout<<"\nFile Deleted";
}
}
//menu.cpp
#include<iostre am.h>
#include<conio. h>
#include<dos.h>
#include<stdio. h>
#include<proces s.h>
void view();
void log();
void set_chan();
void file();
void help();
void about();
void pass();
void setup();
{
int flag=0;
int time;
one:
flag=0;
textcolor(15);
textbackground( 0);
clrscr();
union regs in,out;
cout<<"\n\n\n\n \n\n\t\t\tEnDe setup\n";
textcolor(0);
textbackground( 15);
cout<<"\t\t\t";
cprintf("1.View Logfile");
cout<<"\n\t\t\t 2.Clear logfile");
cout<<"\n\t\t\t 3.Change Setup Password";
cout<<"\n\t\t\t 4.Change Encrypted File's Password";
cout<<"\n\t\t\t 5.Help On Using EnDe";
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t 7.Quit";
swone:
for(time=0;time <3000;time++)
{
delay(10);
if(kbhit())
{
flag=1;
break;
}
}
if(flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case72:
goto seven;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
view();
getch();
goto one;
case 80:
goto two;
default:
goto swone;
}
}
else
{
textbackground( 0);textcolor(7) ;
pass();
}
two:
flag=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\n\t\t\tEnD e Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View logfile";
cout<<"\n\t\t\t ";
cprintf("2.Clea r LogFile");
cout<<"\n\t\t\t 3.Change Setup Password";
cout<<"\n\t\t\t 4.Change Encrypted File's Password";
cout<<"\n\t\t\t 5.Help on using EnDe";
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t 7.Quit";
swtwo:
for(time=0;time <3000:time++)
{
delay(10);
if(kbhit())
{
flag=1;
break;
}
}
if(flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case 72:
goto one;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
log();
goto one;
case 80:
goto three;
default:
goto swtwo;
}
}
else
{
textcolor(7);
textbackground( 0);
pass();
}
three;
falg=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\t\t\tEnDe Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View Logfile";
cout<<"\n\t\t\t 2.Clear Logfile";
cout<<"\n\t\t\t ";
cprintf("3.Chan ge Setup Password");
cout<<"\n\t\t\t 4.Change Encrypted File's Password";
cout<<"\n\t\t\t 5.Help on using EnDe";
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t 7.Quit";
swthree:
for(time=0;time <3000;time++)
{
delay(10);

if(kbhit())
{
flag=1;
break;
}
}
if (flag==1)
{
in.h.ah=0;
int86(22,&in,ou t);
switch(out.h.ah )
{

case 72:
goto two;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
set_chan();
goto one;
case 80:
goto four;
default:
goto swthree;
}
}
else
{
textcolor(7)
textbackground( 0)
pass();
}
four:
flag=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\t\t\tEnDe Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View Logfile";
cout<<"\n\t\t\t 2.Clear Logfile";
cout<<"\n\t\t\t 3.Change Setup Password";
cout<<"\n\t\t\t ";
cprintf("4.Chan ge Encrypted File's Password");
cout<<"\n\t\t\t 5.Help on using EnDe";
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t 7.Quit";
swfour:
for(time=0;time <3000;time++)
{
delay(10);
if(kbhit())
{
falg=1;
break;
}
}
if(flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case72:
goto three;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
file();
goto one;
case 80:
goto five;
default;
goto swfour;
}
}
else
{
textcolor(7);
textbackground( 0);
pass();
}
five:
flag=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\t\t\tEnDe Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View Logfile";
cout<<"\n\t\t\t 2.Clear Logfile";
cout<<"\n\t\t\t 3.Change Setup Password";
cout<<"4.Change Encrypted File's Password";
cout<<"\n\t\t\t ";
cprintf("5.Help on using EnDe");
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t 7.Quit";
swfive:
for(time=0;time <3000;time++)
{
delay(10);
if(kbhit())
{
falg=1;
break;
}
}
if(flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case72:
goto four;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
help();
getch();
goto one;
case 80:
goto six;
default:
goto swfive;
}
}
else
{
textcolor(7);
textbackground( 0);
pass();
}
six:
flag=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\t\t\tEnDe Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View Logfile";
cout<<"\n\t\t\t 2.Clear Logfile";
cout<<"\n\t\t\t 3.Change Setup Password";
cout<<"4.Change Encrypted File's Password";
cout<<"\n\t\t\t 5.Help on using EnDe";
cout<<"\n\t\t\t ";
cprintf("6.Abou t");
cout<<"\n\t\t\t 7.Quit";
swsix:

for(time=0;time <3000;time++)
{
delay(10);
if(kbhit())
{
falg=1;
break;
}
}
if(flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case72:
goto five;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
about();
getch();
goto one;
case 80:
goto seven;
default:
goto swsix;
}
}
else
{
textcolor(7);
textbackground( 0);
pass();
}
seven:
flag=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\t\t\tEnDe Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View Logfile";
cout<<"\n\t\t\t 2.Clear Logfile";
cout<<"3.Change Setup password";
cout<<"\n\t\t\t 4.Change Encrypted File's Password";
cout<<"5.Help on using EnDe";
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t ";
cprintf("7.Quit ");
swseven:
for(time=0;time <3000;time++)
{
delay(10);
if (kbhit())
{
flag=1;
break;
}
}
if (flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case72:
soto six;
case 28:
tetbackground(0 );
textcolor(15);
clrscr();
exit(0);
getch();
goto one;
case 80:
goto one;
default:
goto swseven;
}
}
else{
textcolor(7);
textbackground( 0);
pass();
}
}

}
#include<fstrea m.h>
#include<conio. h>
void view()
{
clrscr();
ifstream ifile;
char line;
while(ifile)
{
ifile.open("end e.log");
line=line-500;
cout<<line;
}
}
#include<fstrea m.h>
#include<conio. h>
#include<dos.h>
void log()
{
cout<<"Are you sure you want to clear the log fike?(y/n)";
char ch;
cin>>ch;
if(ch=='y'||ch= ='Y')
{
ofstream clear;
clear.open("end e.log",ios::tru nc);
clear.close();
cout<<"Log file clearde";
getch();
}
}
#include<fstrea m.h>
#include<conio. h>
#include<string .h>
#include<stdio. h>
#include<proces s.h>
void file()
{
int=-1;
ifstream ifile;
char *fname;
char line;
char *passw,*passc;
char pass[8],pass2[8];
cout<<"Enter the name and path of the file:";
cout<<"\nNote:T O the password of a file you must be in the
directory holding the file";
cout<<"\nEnDe:\ >";
gets(fname);
ifile.open(fnam e);
if(!ifile)
{
cout<<"Could not open file";
exit(1);
}
passw=getpass(" Enter current Password:");
i=strlen(passw) ;
for(ini k=0;k<=1;k++)
{
passw[k]=passw[k]+500;
ifile.get(line) ;
if(passw[k]!=line)
{
cout<<"Password Incorrect";
exit(0);
}
}
ofstream ofile;
ifstream check;
ofile.open("tem p.pad");
passw=getpass(" Enter new password:");
ofile<<passw<<" \n";
passc=getpass(" Verify Password");
ofile<<passc;
ofile.close();
check.open("tem p.pas");
check.getline(p ass1,8);
check.getline(p ass2,8);
check.close();
system("del temp.pas");
if(!strcmp(pass 1,pass2))
{
ofile.open("tem p.tem");
i=strlen(pass1) ;
for(k=0;k<=i;k+ +)
{
pass1[k]=pass1[k]+500;
ofile<<pass1[k];
}
while(!ifile.eo f())
{
ifile.get(line) ;
ofile<<line;
}
cout<<"Password changed successfully";
}

char source[50]="",dest[50]="";
strcat(source," del ");
strcat(source,f name);
strcat(dest,"re n");
strcat(dest,"te mp.tem");
ofile.close();
ifile.close();
strcat(dest,fna me);
system(source);
system(dest);
}

#include<fstrea m.h>
#include<conio. h>
#include<string .h>
#include<stdlib .h>
void set_chan()
{
ofstream setup;
ifstream check;
char *pass,*passc;
char pass1[8],pass2[8];
setup.open("tem p.pas");
pass=getpass("N ew Password:");
int passlen=strlen( pass);
setup<<pass<<"\ n";
passc=getpass<" Verify Password:");
setup<<pasc;
setup.close();
check.open("tem p.pas");
check.getline(p ass1,8);
check.getline(p ass2,8);
check.close();
system("del temp.pas");
setup.open(:"pa ss.end");
if(!strcmp(pass 1,pass2))
{
setup<<passlen;
for(int i=0;i<=passlen; i++)
{
pass1[i]=pass1[i]+69;
setup<<pass1[i];
}
cout<<"The password has been changed successfully";

}
else
cout<<"The Passwords do not match";
getch();
setup.close();
}
#include<iostre am.h>
#include<conio. h>
void help()
{
clrscr();
cout<"\nEncrypt or-Decryptor ver 3.0 usage help:\n";
cout<<"Syntax:\ n";
cout<<"\tEnDe<o ption><source path and file><target path and file>
\n";
cout<<"\n\nOpti ons:\n";
cout<<"E :Encryption Mode\n";
cout<<"D :Decryption Mode\n";
cout<<"S :Delete Source file after Encryption\n";
cout<<"T :Delete Encrypted file afte decryptionn\n";
cout<<"\n\nOr when in EnDe Setup mode,there are five options:\n";
cout<<"1.Clear log File:\n";
cout<<"\tLog File is a file which keeps the history of all the
operations\n";
cout<<"\tcarrie d out through EnDe,in an encrypted format\n";
cout<<"\t This fynction clears the log file so no one can retrieve
the password\n";
cout<<"\tof any of your encrypted files if he knows your setup
password\n";
cout<<"\n\n\n\n ||more||";
getch();
clrscr();
cout<<"2.Change the setup password:\n";
cout<<"\tThis function changes the setup password through which you
can\n";
cout<<"\tagain access to the Setup Menu\n";
cout<<"3.Change the password of an encrypted file:\n";
cout<<"\tThis function changes the password of an already encrypted
file\n";
cout<<"\n4.Help \n";
cout<<"\nabout: \n";
cout<<"\tGives version information and the names of the developers(s)
\n";
cout<<"\n6.Quit :\n";
cout<<"\tQuit EnDe Setup Menu\n";
}
#include<iostre am.h>
#include<conio. h>
void about()
{
clrscr();
cout<<"(Encrypt or-Decryptor)versi on3.0 for MS-DOS\n";
cout<<"<c>2001- R.G.Infotech Ltd.-Project Release\n";
}
#include<fstrea m.h>
#include<stdlib .h>
#include<string .h>
#include<dos.h>
#include<conio. h>
void setup();
void pass()
{
char *p_set;
char set_check[8],setcheck[8],checkpass;
int length;
ifstream setup_pass;
setup_pass.open ("pass.end") ;
setup_pass.get( checkpass);
setup_pass.getl ine(set_check,8 );
setup_pass.clos e();
setup_pass.open ("pass.end") ;
setup_pass.getl ine(setcheck,8) ;
setup_pass.clos e();
clrscr();
char color[80];
ifstream clrs;
clrs.open("grap h.dsp");
for(int col=1;col<=11;c ol++)
{
clrs.getline(co lor,80);
textcolor(col);
for(int no=0;no<strlen( color);no++)
{
putch(color[no]);
delay(7.5);
}
cout<<"\n";
}
clrs.close();
textcolor(10);
int pc;
pcheck:
p_set=getpass(" Enter your setup password:");
int passlen=strlen( p_set);
length=atoi(set check);
if(passlen==len gth)
{
for(pc=0;pc<=pa sslen;pc++)
p_set[pc]=p_set[pc]+69;
if(!strcmp(p_se t,set_check))
setup();
else
goto pcheck;
}
else
goto pcheck;
}




Oct 19 '08 #1
6 2875
pr********@gmai l.com wrote:
#include<fstrea m.h>
#include<proces s.h>
#include<stdlib .h>
#include<conio. h>
#include<string .h>
#include<dos.h>
#include<ctype. h>
#include<stdio. h>
void setup()
void help();
void main(int argc, char *argv[])
char color[80];
ifstream clrs;
clrs.open("grap h.dsp");
if(!clrs)
{
cout<<"Importan t data file missing,will terminate";
getch();
exit(1);
}
for( int col=1;col<=11;c ol++)
{
clrs.getline(co lor,80);
textcolor(col);
for(int no=0;no<strlen( color);no++)
{
putch(color[no]);
delay(7.5);
}
cout<<"\n";
}

clrs.close();
textcolor(seven );
cprintf("");
cout<<"EnDe(enc ryptor-decryptor) version 3.0 for MS-DOS\n";
cout<<"<c2001 -R.G INFOTECH Ltd-project release";
unsigned long enc=5;
if(argc!=4&&arg c!=2)
{
help:
cout<<"\n Encryptor-Decryptor useage help:\n";
cout<<"syntax:\ n";
cout<<"\tEnDe <option<sourc e path and file<target path and
file>";
cout<<"\n\nOpti ons:\n";
cout<<"E :Encryption Mode\n";
cout<<"D :Decryption Mode\n";
cout<<"S :Delete Source file after Encryption\n";
cout<<"T :Delete Encrypted file after Decryption\n";
exit(0);
}
*argv[1]=tolower(*argv[1]);
if(argc==2)
{
if(!strcmp(argv[1],"setup")||!str cmp(argv[1],"setup")
||!strcmp(argv[1],"SETUP"))
{
char *p_set;
char set_check[8],setcheck[8],checkpass;
int length;
ifstream setup_pass;
setup_pass.open ("pass.end") ;
if(!setup_pass)
{
ofstream ofile;
ofile.open("pas s.end");
ofile<<"OE";
ofile.close();
ofile.open("end e.log",ios::tru nc);
ofile.close();
setup_pass.open ("pass.end") ;
}
setup_pass.get( checkpass);
setup_pass.getl ine(set_check,8 );
setup_pass.clos e();
setup_pass.open ("pass.end") ;
setup_pass.getl ine(setcheck,8) ;
setup_pass.clos e();
p_set=getpass(" enter your setup password: ");
int passlen=strlen( p_set);
length=atoi(set check);

if(passlen==len gth)
{
for(int pc=0;pc<=passle n;pc++)
set_check[pc]=set_check[pc]-69;
if(!strcmp(p_se t,set_check))
setup();
else
cout<<"incorrec t password";
exit(0);
}
else
if(passlen!=len gth)
{
cout<<"incorrec t password";
exit(0);
}
}
}
if(*argv[1]!='e'&&argv[1]!='d'&&*argv[1]!='s'&&*argv[1]+'t')
{
help();
}
char line,logout;
char *passw;
char *passc;
char pass1[8],pass2[8];
long =-1;
double size=1.0;
double per=1.0;
char ch;
int flag=0;
float fin;
int fin_i;
ifstream check;
ifstream ifile;
ifstream inlog;
ofstream pas;
ofstream ofile;
ofstream logfile;
logfile.open("t emp.log");
ifile.open(argv[2]);
if(!ifile)
{
cout<<"Error opening Source File,will terminate";
exit(0);
}
check.open(argv[2],ios::in);
ofile.open(argv[3],ios::nonreplac e);
if (!ofile)
{
cout<<"Error opening Target File,will terminate";
exit(0);
}
while(check)
{
check.get(h);
size++;
}
check.close();
if(*argv[1]=='e')
{
cout<<"Mode: Encryption\n";
error_e;
passw=getpass(" Enter Password: ");
pas.open("temp. pas");
pas<<passw<<"\n ";
passc=getpass(" Verify Password: ");
pas<<passc;
pas.close();
check.open("tem p.pas");
check.getline(p ass1,8);
check.getline(p ass2,8);
check.close();
system("del temp.pas");
if(!strcmp(pass 1,pass2));
{
logfile<<"\n\nE ncrypted "argv[2]<<"to"<<argv[3];
logfile<<"\nwit h password"<<pass w;
logfile.close() ;
logfile.open("e nde.log",ios::a pp);
inlog.open("tem p.log");
while(!inlog.eo f())
{
inlog.get(logou t);
logout=logout+5 00;
logfile<<logout ;
}
logfile.close() ;
inlog.close();
system("del temp.log");
i=strlen(passw) ;
for(long k=0;k<=i;k++)
{
passw[k]=passw[k]+500;
ofile<<passw[k];
}
while(!ifile.eo f())
{
ifile.get(line) ;
line=line+enc;
ofile<<line;
if(size<10000)
enc++;
fin=(per/size)*100;
fin_i=(int)fin;
cout<<"\r"<<fin _i<<"% Complete ";
per++;
if(size>10000)
delay(0.001);
else
delay(per);
}

cout<<"\r"<<"Fi le Encrypted";
ifile.close();
ofile.close();
}
else
if(pass2!=pass1 )
{
cout<<"Password Mismatch, Re Enter Password\n";
goto error_e;
}
}
if(*argv[1]=='s')
{
cout<<"Mode: Deletion of Soyrce Fleafter Encryption\n";
error_s:
passw=getpass(" Enter Password: ");
pas.open("temp. pas");
pas<<passw<<"\n ";
passc=getpass(" Verify Password: ");
pas<<passc;
pas.close();
check.open("tem p.pas");
check.getline(p ass1,8);
check.getline(p ass2,8);
check.close();
system("del temp.pas");
if(!strcmp(pass 1,pass2))
{
logfile<<"Encry pted"<<argv[2]<<" to"<<argv[3];
logfile<<"\nwit h password"<<pasw ;
logfile.close() ;
logfile.open("e nde.log",ios::a pp);
inlog.open("tem p.log");

while(!inlog.eo f())
{
inlog.get(logou t);
logout=logout+5 00;
logfile<<logout ;
}
logfile.close() ;
inlog.close();
system<"del temp.log");
i=strlen(passw) ;
for(long k=0;k,=i;k++)
{
passw[k]=passw[k]+500;
ofile<<passw[k];
}
while(!ifile.eo f())
{
ifile.get(line) ;
line=line+enc;
ofile<<line;
if(size<10000)
enc++;
fin=(per/size)*100;
fin_i=(int)fin;
cout<<"\r"<<fin _i<<"% Complete";
per++;
if(size>10000)
delay(0.001);
else
delay(per);
}
cout<<"\r"<<"fi le Encrypted";
ifile.close();
ofile.close();
char del[80]="";
strcat(del,"del ");
strcat(del,argv[2]);
system(del);
cout<<"\nFile Deleted";
}
else
if(flag!=0)
{
cout<<"Password Mismatch,Re Enter password\n";
goto error_s;
}
}
else
if(*argv[1]=='d')
{
cout<<"Mode:Dec ryption \n";
char *passw;
passw=getpass(" Enter Password:m ");
i=strlen(passw) ;
for(long k=0;k<=i;k++)
{
passw[k]=passw[k]+500;
ifile.get(line) ;
if(passw[k]!=line)
{
cout<<"Password Incorrect";
exit(0);
}
}
logfile<<"\n\nD ecrypted"<<argv[2]<<"to"<<argv[3];
logfile.close() ;
logfile.open("E nDe.log",ios::a pp);
inlog.open("tem p.log");
while(!inlog.eo f())
{
inlog.get(logou t);
logout=logout+5 00;
logfile<<logout ;
}
logfile.close() ;
inlog.close();
system("del temp.log");
while(!file.eof ())
{
ifile.get(line) ;
line=line-enc;
ofile<<line;
if(size<10000)
enc++;
fin=(per/size)*100;
fin_i=(int)fin;
cout<<"\r"<<fin _i<<"% Complete";
per++;
if(size>10000)
delay(0.001);
else
delay(per);
}
cout<<"\r"<<"Fi le decrypted";
ifile.close();
ofile.close();
}
if(*argv[1]=='t')
{
cout<<"Mode:del etion of encrypted file after decryption\n";
passw=getpass(" enter password: ");
i=strlen(passw) ;
for(long k=0;k<=i;k++)
{
passw[k]=passw[k]+500;
ifile.get(line) ;
if(passw[k]!=line)
{
cout<<"password incorrect";
exit(0);
}
}
logfile<<"\n\nD ecrypted"<<argv[2]<<"to"<<argv[3];
logfile.close() ;
logfile.open("E nDe.log",ios::a pp);
inlog.open("tem p.log");
while(!inlog.eo f())
{
inlog.get(logou t);
logout=logout+5 00;
logfile<<logout ;
}
logfile.close() ;
inlog.close();
system("del temp.log");
while(!ifile.eo f());
{
ifile.get(line) ;
line=line-enc;
ofile<<line;
if(size<10000)
enc++;
fin=(per/size)*100;
fin_i=(int)fin;
cout<<"\r"<<fin _i<<"% Complete";
per++;
if(size>10000)
delay(0.001);
else
delay(per);
}
cout<<"\r"<<"fi le Decrypted";
ifile.close();
ofile.close();
char del[80]="";
strcat(del,{:"d el ");
strcat(del,argv[2]);
system(del);
cout<<"\nFile Deleted";
}
}
//menu.cpp
#include<iostre am.h>
#include<conio. h>
#include<dos.h>
#include<stdio. h>
#include<proces s.h>
void view();
void log();
void set_chan();
void file();
void help();
void about();
void pass();
void setup();
{
int flag=0;
int time;
one:
flag=0;
textcolor(15);
textbackground( 0);
clrscr();
union regs in,out;
cout<<"\n\n\n\n \n\n\t\t\tEnDe setup\n";
textcolor(0);
textbackground( 15);
cout<<"\t\t\t";
cprintf("1.View Logfile");
cout<<"\n\t\t\t 2.Clear logfile");
cout<<"\n\t\t\t 3.Change Setup Password";
cout<<"\n\t\t\t 4.Change Encrypted File's Password";
cout<<"\n\t\t\t 5.Help On Using EnDe";
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t 7.Quit";
swone:
for(time=0;time <3000;time++)
{
delay(10);
if(kbhit())
{
flag=1;
break;
}
}
if(flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case72:
goto seven;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
view();
getch();
goto one;
case 80:
goto two;
default:
goto swone;
}
}
else
{
textbackground( 0);textcolor(7) ;
pass();
}
two:
flag=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\n\t\t\tEnD e Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View logfile";
cout<<"\n\t\t\t ";
cprintf("2.Clea r LogFile");
cout<<"\n\t\t\t 3.Change Setup Password";
cout<<"\n\t\t\t 4.Change Encrypted File's Password";
cout<<"\n\t\t\t 5.Help on using EnDe";
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t 7.Quit";
swtwo:
for(time=0;time <3000:time++)
{
delay(10);
if(kbhit())
{
flag=1;
break;
}
}
if(flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case 72:
goto one;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
log();
goto one;
case 80:
goto three;
default:
goto swtwo;
}
}
else
{
textcolor(7);
textbackground( 0);
pass();
}
three;
falg=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\t\t\tEnDe Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View Logfile";
cout<<"\n\t\t\t 2.Clear Logfile";
cout<<"\n\t\t\t ";
cprintf("3.Chan ge Setup Password");
cout<<"\n\t\t\t 4.Change Encrypted File's Password";
cout<<"\n\t\t\t 5.Help on using EnDe";
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t 7.Quit";
swthree:
for(time=0;time <3000;time++)
{
delay(10);

if(kbhit())
{
flag=1;
break;
}
}
if (flag==1)
{
in.h.ah=0;
int86(22,&in,ou t);
switch(out.h.ah )
{

case 72:
goto two;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
set_chan();
goto one;
case 80:
goto four;
default:
goto swthree;
}
}
else
{
textcolor(7)
textbackground( 0)
pass();
}
four:
flag=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\t\t\tEnDe Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View Logfile";
cout<<"\n\t\t\t 2.Clear Logfile";
cout<<"\n\t\t\t 3.Change Setup Password";
cout<<"\n\t\t\t ";
cprintf("4.Chan ge Encrypted File's Password");
cout<<"\n\t\t\t 5.Help on using EnDe";
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t 7.Quit";
swfour:
for(time=0;time <3000;time++)
{
delay(10);
if(kbhit())
{
falg=1;
break;
}
}
if(flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case72:
goto three;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
file();
goto one;
case 80:
goto five;
default;
goto swfour;
}
}
else
{
textcolor(7);
textbackground( 0);
pass();
}
five:
flag=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\t\t\tEnDe Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View Logfile";
cout<<"\n\t\t\t 2.Clear Logfile";
cout<<"\n\t\t\t 3.Change Setup Password";
cout<<"4.Change Encrypted File's Password";
cout<<"\n\t\t\t ";
cprintf("5.Help on using EnDe");
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t 7.Quit";
swfive:
for(time=0;time <3000;time++)
{
delay(10);
if(kbhit())
{
falg=1;
break;
}
}
if(flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case72:
goto four;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
help();
getch();
goto one;
case 80:
goto six;
default:
goto swfive;
}
}
else
{
textcolor(7);
textbackground( 0);
pass();
}
six:
flag=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\t\t\tEnDe Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View Logfile";
cout<<"\n\t\t\t 2.Clear Logfile";
cout<<"\n\t\t\t 3.Change Setup Password";
cout<<"4.Change Encrypted File's Password";
cout<<"\n\t\t\t 5.Help on using EnDe";
cout<<"\n\t\t\t ";
cprintf("6.Abou t");
cout<<"\n\t\t\t 7.Quit";
swsix:

for(time=0;time <3000;time++)
{
delay(10);
if(kbhit())
{
falg=1;
break;
}
}
if(flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case72:
goto five;
case 28:
textbackground( 0);
textcolor(15);
clrscr();
about();
getch();
goto one;
case 80:
goto seven;
default:
goto swsix;
}
}
else
{
textcolor(7);
textbackground( 0);
pass();
}
seven:
flag=0;
textbackground( 0);
textcolor(15);
clrscr();
cout<<"\n\n\n\n \n\n\t\t\tEnDe Setup";
textcolor(0);
textbackground( 15);
cout<<"\n\t\t\t 1.View Logfile";
cout<<"\n\t\t\t 2.Clear Logfile";
cout<<"3.Change Setup password";
cout<<"\n\t\t\t 4.Change Encrypted File's Password";
cout<<"5.Help on using EnDe";
cout<<"\n\t\t\t 6.About";
cout<<"\n\t\t\t ";
cprintf("7.Quit ");
swseven:
for(time=0;time <3000;time++)
{
delay(10);
if (kbhit())
{
flag=1;
break;
}
}
if (flag==1)
{
in.h.ah=0;
int86(22,&in,&o ut);
switch(out.h.ah )
{
case72:
soto six;
case 28:
tetbackground(0 );
textcolor(15);
clrscr();
exit(0);
getch();
goto one;
case 80:
goto one;
default:
goto swseven;
}
}
else{
textcolor(7);
textbackground( 0);
pass();
}
}

}
#include<fstrea m.h>
#include<conio. h>
void view()
{
clrscr();
ifstream ifile;
char line;
while(ifile)
{
ifile.open("end e.log");
line=line-500;
cout<<line;
}
}
#include<fstrea m.h>
#include<conio. h>
#include<dos.h>
void log()
{
cout<<"Are you sure you want to clear the log fike?(y/n)";
char ch;
cin>>ch;
if(ch=='y'||ch= ='Y')
{
ofstream clear;
clear.open("end e.log",ios::tru nc);
clear.close();
cout<<"Log file clearde";
getch();
}
}
#include<fstrea m.h>
#include<conio. h>
#include<string .h>
#include<stdio. h>
#include<proces s.h>
void file()
{
int=-1;
ifstream ifile;
char *fname;
char line;
char *passw,*passc;
char pass[8],pass2[8];
cout<<"Enter the name and path of the file:";
cout<<"\nNote:T O the password of a file you must be in the
directory holding the file";
cout<<"\nEnDe:\ >";
gets(fname);
ifile.open(fnam e);
if(!ifile)
{
cout<<"Could not open file";
exit(1);
}
passw=getpass(" Enter current Password:");
i=strlen(passw) ;
for(ini k=0;k<=1;k++)
{
passw[k]=passw[k]+500;
ifile.get(line) ;
if(passw[k]!=line)
{
cout<<"Password Incorrect";
exit(0);
}
}
ofstream ofile;
ifstream check;
ofile.open("tem p.pad");
passw=getpass(" Enter new password:");
ofile<<passw<<" \n";
passc=getpass(" Verify Password");
ofile<<passc;
ofile.close();
check.open("tem p.pas");
check.getline(p ass1,8);
check.getline(p ass2,8);
check.close();
system("del temp.pas");
if(!strcmp(pass 1,pass2))
{
ofile.open("tem p.tem");
i=strlen(pass1) ;
for(k=0;k<=i;k+ +)
{
pass1[k]=pass1[k]+500;
ofile<<pass1[k];
}
while(!ifile.eo f())
{
ifile.get(line) ;
ofile<<line;
}
cout<<"Password changed successfully";
}

char source[50]="",dest[50]="";
strcat(source," del ");
strcat(source,f name);
strcat(dest,"re n");
strcat(dest,"te mp.tem");
ofile.close();
ifile.close();
strcat(dest,fna me);
system(source);
system(dest);
}

#include<fstrea m.h>
#include<conio. h>
#include<string .h>
#include<stdlib .h>
void set_chan()
{
ofstream setup;
ifstream check;
char *pass,*passc;
char pass1[8],pass2[8];
setup.open("tem p.pas");
pass=getpass("N ew Password:");
int passlen=strlen( pass);
setup<<pass<<"\ n";
passc=getpass<" Verify Password:");
setup<<pasc;
setup.close();
check.open("tem p.pas");
check.getline(p ass1,8);
check.getline(p ass2,8);
check.close();
system("del temp.pas");
setup.open(:"pa ss.end");
if(!strcmp(pass 1,pass2))
{
setup<<passlen;
for(int i=0;i<=passlen; i++)
{
pass1[i]=pass1[i]+69;
setup<<pass1[i];
}
cout<<"The password has been changed successfully";

}
else
cout<<"The Passwords do not match";
getch();
setup.close();
}
#include<iostre am.h>
#include<conio. h>
void help()
{
clrscr();
cout<"\nEncrypt or-Decryptor ver 3.0 usage help:\n";
cout<<"Syntax:\ n";
cout<<"\tEnDe<o ption><source path and file><target path and file>
\n";
cout<<"\n\nOpti ons:\n";
cout<<"E :Encryption Mode\n";
cout<<"D :Decryption Mode\n";
cout<<"S :Delete Source file after Encryption\n";
cout<<"T :Delete Encrypted file afte decryptionn\n";
cout<<"\n\nOr when in EnDe Setup mode,there are five options:\n";
cout<<"1.Clear log File:\n";
cout<<"\tLog File is a file which keeps the history of all the
operations\n";
cout<<"\tcarrie d out through EnDe,in an encrypted format\n";
cout<<"\t This fynction clears the log file so no one can retrieve
the password\n";
cout<<"\tof any of your encrypted files if he knows your setup
password\n";
cout<<"\n\n\n\n ||more||";
getch();
clrscr();
cout<<"2.Change the setup password:\n";
cout<<"\tThis function changes the setup password through which you
can\n";
cout<<"\tagain access to the Setup Menu\n";
cout<<"3.Change the password of an encrypted file:\n";
cout<<"\tThis function changes the password of an already encrypted
file\n";
cout<<"\n4.Help \n";
cout<<"\nabout: \n";
cout<<"\tGives version information and the names of the developers(s)
\n";
cout<<"\n6.Quit :\n";
cout<<"\tQuit EnDe Setup Menu\n";
}
#include<iostre am.h>
#include<conio. h>
void about()
{
clrscr();
cout<<"(Encrypt or-Decryptor)versi on3.0 for MS-DOS\n";
cout<<"<c>2001- R.G.Infotech Ltd.-Project Release\n";
}
#include<fstrea m.h>
#include<stdlib .h>
#include<string .h>
#include<dos.h>
#include<conio. h>
void setup();
void pass()
{
char *p_set;
char set_check[8],setcheck[8],checkpass;
int length;
ifstream setup_pass;
setup_pass.open ("pass.end") ;
setup_pass.get( checkpass);
setup_pass.getl ine(set_check,8 );
setup_pass.clos e();
setup_pass.open ("pass.end") ;
setup_pass.getl ine(setcheck,8) ;
setup_pass.clos e();
clrscr();
char color[80];
ifstream clrs;
clrs.open("grap h.dsp");
for(int col=1;col<=11;c ol++)
{
clrs.getline(co lor,80);
textcolor(col);
for(int no=0;no<strlen( color);no++)
{
putch(color[no]);
delay(7.5);
}
cout<<"\n";
}
clrs.close();
textcolor(10);
int pc;
pcheck:
p_set=getpass(" Enter your setup password:");
int passlen=strlen( p_set);
length=atoi(set check);
if(passlen==len gth)
{
for(pc=0;pc<=pa sslen;pc++)
p_set[pc]=p_set[pc]+69;
if(!strcmp(p_se t,set_check))
setup();
else
goto pcheck;
}
else
goto pcheck;
}



What is this?
What errors does it have?
What is dos.h?
Oct 19 '08 #2
Michael wrote:
pr********@gmai l.com wrote:
Awful code
>>
What is this?
What errors does it have?
What is dos.h?
Did you really have to quote all that just to add this?

--
Ian Collins
Oct 19 '08 #3
Do you *really* expect us to do your work for you? You must be
kidding, right?
Oct 19 '08 #4
<pr********@gma il.comwrote:
#include<fstrea m.h>
#include<proces s.h>
#include<stdlib .h>
#include<conio. h>
#include<string .h>
#include<dos.h>
#include<ctype. h>
#include<stdio. h>
void setup()
void help();
void main(int argc, char *argv[])
char color[80];
<snip>

The first error I note is that
void main(int argc, char *argv[])
should be followed by either a ; or a {.

It has neither of these. A ; would make it a function prototype and a {
would make it a function definition..

How big was the file the last time you made a successful compile? If the
answer is "never did" you have written *far* too much code without
compiling. Also, you do not use enough functions. Functions allow you to
clear your mind of excessive details and focus on one relatively small part
of the problem. My guess is you intend to use three functions for this
program. Visualize a novel written with three paragraphs. Does that sound
like a good idea?

Bottom line, write this off as a learning experience and throw it away.
Start over.

Oops. I looked again and now the first error I see is the lack of a ; after
void setup()
which would make it a function prototype.



Oct 19 '08 #5
On Oct 19, 5:00*pm, "osmium" <r124c4u...@com cast.netwrote:
<priyajo...@gma il.comwrote:
#include<fstrea m.h>
#include<proces s.h>
#include<stdlib .h>
#include<conio. h>
#include<string .h>
#include<dos.h>
#include<ctype. h>
#include<stdio. h>
void setup()
void help();
void main(int argc, char *argv[])
char color[80];
<snip>
The first error I note is that
* void main(int argc, char *argv[])
should be followed by either a ; or a {.
It has neither of these. *A ; would make it a function
prototype and a { would make it a function definition..
Actually, the first error I encountered was "#include
<fstream.h>". A non-existant header. Followed by similar
errors for <process.h>, <conio.hand <dos.h>.

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Oct 19 '08 #6
In article
<69************ *************** *******@s1g2000 prg.googlegroup s.com>,
pr********@gmai l.com wrote:
please help me correct the errors in this program.have to submit the
project tomorrow!!
>
#include<fstrea m.h>
[...]

Job aborted. Payment required before work will be done for you. Suitable
sum=$1,000,000 (ONE MILLION US DOLLARS).
Oct 19 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1626
by: Ali | last post by:
The following program is supposed to display a dropdown menu, however, it only shows the File and Help things. from Tkinter import * root = Tk() #create menu m = Menu(root) root.config(menu=m)
1
320
by: Dr. Zharkov | last post by:
Hello. A problem in the following. In VB .NET 2003 I create the project and in file Form1.vb is written down the following code: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Create the data: CreateData() 'Error End Sub
9
1583
by: goosen_cug | last post by:
This program is a "Sequential List" class I want to do the Union Operation,Intersection Operation of the Set.But this program have a problem: /////////////////////////// Compiling... Set.cpp H:\cheung\Set\Set.cpp(81) : error C2664: 'Insert' : cannot convert parameter 1 from 'int' to 'int &' A reference that is not to 'const' cannot be bound to a non-lvalue
5
2198
by: mohammaditraders | last post by:
Question # 1 Write a program which consists of a class named Student, the class should consists of three data members Name, Ob_marks, Total_marks and two member functions Cal_percentage() which calculate the percentage of the student by the formula (Ob_marks * 100 )/Total_marks and Display() which show all information of the student. The class should also contain the default constructor which initializes all the data member of...
9
1967
by: tvnaidu | last post by:
This is just small plain HTML program wtote manually (since I am new to web programming, may be some tools I can use I think), this program loaded onto microcontroller with small foot print web server, when program prints, half-way it prints, then it struck, any issue with this?. when user clicks "submit" again it loaded same page. but it sends some sytring to server (plug1=ON&......), that string will be processed inside server. any open...
4
1858
by: ahmee | last post by:
please any one can explain me this code of region matches program line by line and also the function of region matches. class regionMatches_Test{ public static void main(String args){ String s1= "tsinghua"; String s2="it is TsingHua"; //public boolean regionMatches(int toffset,String other,int ooffset,int len) System.out.println( s1.regionMatches(0,s2,5,7)) ;
0
8989
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.