error in converting from c to c++

please help me edit this code!!! help me convert this code

Page 1 of 1

2 Replies - 566 Views - Last Post: 15 January 2009 - 10:46 AM Rate Topic: -----

#1 shoamal  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 15-January 09

error in converting from c to c++

Post icon  Posted 15 January 2009 - 10:15 AM

/*CALENDAR PROJECT*/
/* including header files */
#include<graphics.h>
#include<conio.h>
void main()
{
int a[20],b=0,l=28;
char c;
int loop=0;
calloop :
clrscr();
printf("\n\tENTER THE YEAR ");/*START OF YEAR DETECTION BLOCK*/
scanf("%d",&a[1]);
if((a[1]%4==0&&a[1]%100!=0)||(a[1]%400==0))
{ /*LEAP YEAR CORRECTION*/
l=29;
}
if(a[1]>=1980&&a[1]<=32000)
{
for(a[2]=1980;a[2]<=a[1];a[2]++) /*FORWARD MODE*/
{
a[3]=a[2]%4;
if(a[3]==1)
{
b=b+1;
}
if((a[2]%400==100)||(a[2]%400==200)||(a[2]%400==300))
{
b=b-1;
}
} /*a[4] CONTAINS FIRST DAY CODE*/
a[4]=((a[1]-1980)+B)%7;
} /*END OF FORWARD MODE*/
if(a[1]<1980&&a[1]>=1)
{
for(a[2]=1979;a[2]>=a[1];a[2]--) /*REVERSE MODE BEGINING*/
{
a[3]=a[2]%4;
if(a[3]==0)
{
b=b+1;
}
if((a[2]%400==100)||(a[2]%400==200)||(a[2]%400==300))
{
b=b-1;
}
}
a[5]=((1979-a[1])+B)%7; /*END OF REVERSE MODE*/
a[4]=6-a[5]; /*SET FIRST DAY*/
}
if(a[1]<1||a[1]>28000)
{
printf("\nINVALID YEAR !");
} /*END OF YEAR DETECTION BLOCK*/

printf("\n\tENTER MONTH [ 1 - 12 ]\t"); /*START OF FIRST MONTH DAY DETECTION BLOCK*/
scanf("%d",&a[6]);
while(!(a[6]>=1 && a[6]<=12))
{
clrscr();
printf("\n\tENTER MONTH [ 1 - 12 ]\t"); /*START OF FIRST MONTH DAY DETECTION BLOCK*/
scanf("%d",&a[6]);
}

if(a[6]<1||a[6]>12)
{
printf("\nINVALID MONTH !");
getch();
return;
}
if(a[6]==1)
{
a[7]=a[4]; /*a[7] CONTAINS FIRST MONTH DAY CODE*/
}
if(a[6]==2)
{
a[7]=(a[4]+31)%7;
}
if(a[6]==3)
{
a[7]=(a[4]+31+l)%7;
}
if(a[6]==4)
{
a[7]=(a[4]+31+l+31)%7;
}
if(a[6]==5)
{
a[7]=(a[4]+31+l+31+30)%7;
}
if(a[6]==6)
{
a[7]=(a[4]+31+l+31+30+31)%7;
}
if(a[6]==7)
{
a[7]=(a[4]+31+l+31+30+31+30)%7;
}
if(a[6]==8)
{
a[7]=(a[4]+31+l+31+30+31+30+31)%7;
}
if(a[6]==9)
{
a[7]=(a[4]+31+l+31+30+31+30+31+31)%7;
}
if(a[6]==10)
{
a[7]=(a[4]+31+l+31+30+31+30+31+31+30)%7;
}
if(a[6]==11)
{
a[7]=(a[4]+31+l+31+30+31+30+31+31+30+31)%7;
}
if(a[6]==12)
{
a[7]=(a[4]+31+l+31+30+31+30+31+31+30+31+30)%7;
} /*END OF FIRST MONTH DAY DETECTION BLOCK*/
if(a[6]==1||a[6]==3||a[6]==5||a[6]==7||a[6]==8||a[6]==10||a[6]==12)/*START OF NO. OF DAY DETECTION BLOCK*/
{
a[8]=31;
}
if(a[6]==4||a[6]==6||a[6]==9||a[6]==11)
{
a[8]=30;
}
if(a[6]==2&&(a[1]%4!=0||a[1]%400==100||a[1]%400==200||a[1]%400==300))
{
a[8]=28;
}
if(a[6]==2&&a[1]%4==0&&(a[1]%400!=100||a[1]%400!=200||a[1]%400!=300))
{
a[8]=29;
} /*END OF NO. OF DAY DETECTION BLOCK*/
draw();
insert(a[7],a[8]);
decor(a[1],a[6]);
getch();
closegraph();
clrscr();
printf("\n\t PRESS 1 TO CONTINUE 2 TO EXIT \t");
scanf("%d",&loop);
switch(loop)
{
case 1 : goto calloop;
case 2 : exit(1);
default : exit(1);
}
return ; /*END OF MAIN*/
}
draw(int yr,int mnt)
{
int gd=DETECT,gm,x,y,a=175,b=100,c=0;
clrscr();
initgraph(&gd,&gm,"d:\\tcc");
x=getmaxx();
y=getmaxy();
for(c=0;c<=41;c++)
{
setcolor(GREEN);
rectangle(a,b,a+35,b+35);
rectangle(a-1,b-1,a+36,b+36);
a=a+36;
if(a==427)
{
a=175;
b=b+36;
}
}
setcolor(YELLOW);
outtextxy(181,113,"SUN");
outtextxy(217,113,"MON");
outtextxy(253,113,"TUE");
outtextxy(289,113,"WED");
outtextxy(325,113,"THU");
outtextxy(361,113,"FRI");
outtextxy(397,113,"SAT");
return;
}
insert(int s,int t)
{
if(s==0&&t==31)
{
c_0_31();
}
if(s==1&&t==31)
{
c_1_31();
}
if(s==2&&t==31)
{
c_2_31();
}
if(s==3&&t==31)
{
c_3_31();
}
if(s==4&&t==31)
{
c_4_31();
}
if(s==5&&t==31)
{
c_5_31();
}
if(s==6&&t==31)
{
c_6_31();
} /*end of first condition set*/
if(s==0&&t==30)
{
c_0_30();
}
if(s==1&&t==30)
{
c_1_30();
}
if(s==2&&t==30)
{
c_2_30();
}
if(s==3&&t==30)
{
c_3_30();
}
if(s==4&&t==30)
{
c_4_30();
}
if(s==5&&t==30)
{
c_5_30();
}
if(s==6&&t==30)
{
c_6_30();
} /*end of second condition set*/
if(s==0&&t==29)
{
c_0_29();
}
if(s==1&&t==29)
{
c_1_29();
}
if(s==2&&t==29)
{
c_2_29();
}
if(s==3&&t==29)
{
c_3_29();
}
if(s==4&&t==29)
{
c_4_29();
}
if(s==5&&t==29)
{
c_5_29();
}
if(s==6&&t==29)
{
c_6_29();
} /*end of third condition set*/
if(s==0&&t==28)
{
c_0_28();
}
if(s==1&&t==28)
{
c_1_28();
}
if(s==2&&t==28)
{
c_2_28();
}
if(s==3&&t==28)
{
c_3_28();
}
if(s==4&&t==28)
{
c_4_28();
}
if(s==5&&t==28)
{
c_5_28();
}
if(s==6&&t==28)
{
c_6_28();
} /*end of fourth condition set*/
return;
}
c_0_31()
{ /*c_0_31 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"1");
outtextxy(292,149,"2");
outtextxy(328,149,"3");
outtextxy(364,149,"4");
outtextxy(400,149,"5"); /*first row ends*/
outtextxy(184,185,"6");
outtextxy(220,185,"7");
outtextxy(256,185,"8");
outtextxy(292,185,"9");
outtextxy(328,185,"10");
outtextxy(364,185,"11");
outtextxy(400,185,"12"); /*second row ends*/
outtextxy(184,221,"13");
outtextxy(220,221,"14");
outtextxy(256,221,"15");
outtextxy(292,221,"16");
outtextxy(328,221,"17");
outtextxy(364,221,"18");
outtextxy(400,221,"19"); /*third row ends*/
outtextxy(184,257,"20");
outtextxy(220,257,"21");
outtextxy(256,257,"22");
outtextxy(292,257,"23");
outtextxy(328,257,"24");
outtextxy(364,257,"25");
outtextxy(400,257,"26"); /*fourth row ends*/
outtextxy(184,293,"27");
outtextxy(220,293,"28");
outtextxy(256,293,"29");
outtextxy(292,293,"30");
outtextxy(328,293,"31");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_0_31 ends*/
return;
}
c_1_31()
{ /*c_1_31 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"1");
outtextxy(328,149,"2");
outtextxy(364,149,"3");
outtextxy(400,149,"4"); /*first row ends*/
outtextxy(184,185,"5");
outtextxy(220,185,"6");
outtextxy(256,185,"7");
outtextxy(292,185,"8");
outtextxy(328,185,"9");
outtextxy(364,185,"10");
outtextxy(400,185,"11"); /*second row ends*/
outtextxy(184,221,"12");
outtextxy(220,221,"13");
outtextxy(256,221,"14");
outtextxy(292,221,"15");
outtextxy(328,221,"16");
outtextxy(364,221,"17");
outtextxy(400,221,"18"); /*third row ends*/
outtextxy(184,257,"19");
outtextxy(220,257,"20");
outtextxy(256,257,"21");
outtextxy(292,257,"22");
outtextxy(328,257,"23");
outtextxy(364,257,"24");
outtextxy(400,257,"25"); /*fourth row ends*/
outtextxy(184,293,"26");
outtextxy(220,293,"27");
outtextxy(256,293,"28");
outtextxy(292,293,"29");
outtextxy(328,293,"30");
outtextxy(364,293,"31");
outtextxy(400,293,""); /*fifth row & condition c_1_31 ends*/
return;
}
c_2_31()
{ /*c_2_31 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"1");
outtextxy(364,149,"2");
outtextxy(400,149,"3"); /*first row ends*/
outtextxy(184,185,"4");
outtextxy(220,185,"5");
outtextxy(256,185,"6");
outtextxy(292,185,"7");
outtextxy(328,185,"8");
outtextxy(364,185,"9");
outtextxy(400,185,"10"); /*second row ends*/
outtextxy(184,221,"11");
outtextxy(220,221,"12");
outtextxy(256,221,"13");
outtextxy(292,221,"14");
outtextxy(328,221,"15");
outtextxy(364,221,"16");
outtextxy(400,221,"17"); /*third row ends*/
outtextxy(184,257,"18");
outtextxy(220,257,"19");
outtextxy(256,257,"20");
outtextxy(292,257,"21");
outtextxy(328,257,"22");
outtextxy(364,257,"23");
outtextxy(400,257,"24"); /*fourth row ends*/
outtextxy(184,293,"25");
outtextxy(220,293,"26");
outtextxy(256,293,"27");
outtextxy(292,293,"28");
outtextxy(328,293,"29");
outtextxy(364,293,"30");
outtextxy(400,293,"31"); /*fifth row & condition c_2_31 ends*/
return;
}
c_3_31()
{ /*c_3_31 condition*/
outtextxy(184,149,"31");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"");
outtextxy(364,149,"1");
outtextxy(400,149,"2"); /*first row ends*/
outtextxy(184,185,"3");
outtextxy(220,185,"4");
outtextxy(256,185,"5");
outtextxy(292,185,"6");
outtextxy(328,185,"7");
outtextxy(364,185,"8");
outtextxy(400,185,"9"); /*second row ends*/
outtextxy(184,221,"10");
outtextxy(220,221,"11");
outtextxy(256,221,"12");
outtextxy(292,221,"13");
outtextxy(328,221,"14");
outtextxy(364,221,"15");
outtextxy(400,221,"16"); /*third row ends*/
outtextxy(184,257,"17");
outtextxy(220,257,"18");
outtextxy(256,257,"19");
outtextxy(292,257,"20");
outtextxy(328,257,"21");
outtextxy(364,257,"22");
outtextxy(400,257,"23"); /*fourth row ends*/
outtextxy(184,293,"24");
outtextxy(220,293,"25");
outtextxy(256,293,"26");
outtextxy(292,293,"27");
outtextxy(328,293,"28");
outtextxy(364,293,"29");
outtextxy(400,293,"30"); /*fifth row & condition c_3_31 ends*/
return;
}
c_4_31()
{ /*c_4_31 condition*/
outtextxy(184,149,"30");
outtextxy(220,149,"31");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"");
outtextxy(364,149,"");
outtextxy(400,149,"1"); /*first row ends*/
outtextxy(184,185,"2");
outtextxy(220,185,"3");
outtextxy(256,185,"4");
outtextxy(292,185,"5");
outtextxy(328,185,"6");
outtextxy(364,185,"7");
outtextxy(400,185,"8"); /*second row ends*/
outtextxy(184,221,"9");
outtextxy(220,221,"10");
outtextxy(256,221,"11");
outtextxy(292,221,"12");
outtextxy(328,221,"13");
outtextxy(364,221,"14");
outtextxy(400,221,"15"); /*third row ends*/
outtextxy(184,257,"16");
outtextxy(220,257,"17");
outtextxy(256,257,"18");
outtextxy(292,257,"19");
outtextxy(328,257,"20");
outtextxy(364,257,"21");
outtextxy(400,257,"22"); /*fourth row ends*/
outtextxy(184,293,"23");
outtextxy(220,293,"24");
outtextxy(256,293,"25");
outtextxy(292,293,"26");
outtextxy(328,293,"27");
outtextxy(364,293,"28");
outtextxy(400,293,"29"); /*fifth row & condition c_4_31 ends*/
return;
}
c_5_31()
{ /*c_5_31 condition*/
outtextxy(184,149,"1");
outtextxy(220,149,"2");
outtextxy(256,149,"3");
outtextxy(292,149,"4");
outtextxy(328,149,"5");
outtextxy(364,149,"6");
outtextxy(400,149,"7"); /*first row ends*/
outtextxy(184,185,"8");
outtextxy(220,185,"9");
outtextxy(256,185,"10");
outtextxy(292,185,"11");
outtextxy(328,185,"12");
outtextxy(364,185,"13");
outtextxy(400,185,"14"); /*second row ends*/
outtextxy(184,221,"15");
outtextxy(220,221,"16");
outtextxy(256,221,"17");
outtextxy(292,221,"18");
outtextxy(328,221,"19");
outtextxy(364,221,"20");
outtextxy(400,221,"21"); /*third row ends*/
outtextxy(184,257,"22");
outtextxy(220,257,"23");
outtextxy(256,257,"24");
outtextxy(292,257,"25");
outtextxy(328,257,"26");
outtextxy(364,257,"27");
outtextxy(400,257,"28"); /*fourth row ends*/
outtextxy(184,293,"29");
outtextxy(220,293,"30");
outtextxy(256,293,"31");
outtextxy(292,293,"");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_5_31 ends*/
return;
}
c_6_31()
{ /*c_6_31 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"1");
outtextxy(256,149,"2");
outtextxy(292,149,"3");
outtextxy(328,149,"4");
outtextxy(364,149,"5");
outtextxy(400,149,"6"); /*first row ends*/
outtextxy(184,185,"7");
outtextxy(220,185,"8");
outtextxy(256,185,"9");
outtextxy(292,185,"10");
outtextxy(328,185,"11");
outtextxy(364,185,"12");
outtextxy(400,185,"13"); /*second row ends*/
outtextxy(184,221,"14");
outtextxy(220,221,"15");
outtextxy(256,221,"16");
outtextxy(292,221,"17");
outtextxy(328,221,"18");
outtextxy(364,221,"19");
outtextxy(400,221,"20"); /*third row ends*/
outtextxy(184,257,"21");
outtextxy(220,257,"22");
outtextxy(256,257,"23");
outtextxy(292,257,"24");
outtextxy(328,257,"25");
outtextxy(364,257,"26");
outtextxy(400,257,"27"); /*fourth row ends*/
outtextxy(184,293,"28");
outtextxy(220,293,"29");
outtextxy(256,293,"30");
outtextxy(292,293,"31");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_6_31 ends*//*31 condition ends*/
return;
}
c_0_30()
{ /*c_0_30 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"1");
outtextxy(292,149,"2");
outtextxy(328,149,"3");
outtextxy(364,149,"4");
outtextxy(400,149,"5"); /*first row ends*/
outtextxy(184,185,"6");
outtextxy(220,185,"7");
outtextxy(256,185,"8");
outtextxy(292,185,"9");
outtextxy(328,185,"10");
outtextxy(364,185,"11");
outtextxy(400,185,"12"); /*second row ends*/
outtextxy(184,221,"13");
outtextxy(220,221,"14");
outtextxy(256,221,"15");
outtextxy(292,221,"16");
outtextxy(328,221,"17");
outtextxy(364,221,"18");
outtextxy(400,221,"19"); /*third row ends*/
outtextxy(184,257,"20");
outtextxy(220,257,"21");
outtextxy(256,257,"22");
outtextxy(292,257,"23");
outtextxy(328,257,"24");
outtextxy(364,257,"25");
outtextxy(400,257,"26"); /*fourth row ends*/
outtextxy(184,293,"27");
outtextxy(220,293,"28");
outtextxy(256,293,"29");
outtextxy(292,293,"30");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_0_30 ends*/
return;
}
c_1_30()
{ /*c_1_30 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"1");
outtextxy(328,149,"2");
outtextxy(364,149,"3");
outtextxy(400,149,"4"); /*first row ends*/
outtextxy(184,185,"5");
outtextxy(220,185,"6");
outtextxy(256,185,"7");
outtextxy(292,185,"8");
outtextxy(328,185,"9");
outtextxy(364,185,"10");
outtextxy(400,185,"11"); /*second row ends*/
outtextxy(184,221,"12");
outtextxy(220,221,"13");
outtextxy(256,221,"14");
outtextxy(292,221,"15");
outtextxy(328,221,"16");
outtextxy(364,221,"17");
outtextxy(400,221,"18"); /*third row ends*/
outtextxy(184,257,"19");
outtextxy(220,257,"20");
outtextxy(256,257,"21");
outtextxy(292,257,"22");
outtextxy(328,257,"23");
outtextxy(364,257,"24");
outtextxy(400,257,"25"); /*fourth row ends*/
outtextxy(184,293,"26");
outtextxy(220,293,"27");
outtextxy(256,293,"28");
outtextxy(292,293,"29");
outtextxy(328,293,"30");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_1_30 ends*/
return;
}
c_2_30()
{ /*c_2_30 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"1");
outtextxy(364,149,"2");
outtextxy(400,149,"3"); /*first row ends*/
outtextxy(184,185,"4");
outtextxy(220,185,"5");
outtextxy(256,185,"6");
outtextxy(292,185,"7");
outtextxy(328,185,"8");
outtextxy(364,185,"9");
outtextxy(400,185,"10"); /*second row ends*/
outtextxy(184,221,"11");
outtextxy(220,221,"12");
outtextxy(256,221,"13");
outtextxy(292,221,"14");
outtextxy(328,221,"15");
outtextxy(364,221,"16");
outtextxy(400,221,"17"); /*third row ends*/
outtextxy(184,257,"18");
outtextxy(220,257,"19");
outtextxy(256,257,"20");
outtextxy(292,257,"21");
outtextxy(328,257,"22");
outtextxy(364,257,"23");
outtextxy(400,257,"24"); /*fourth row ends*/
outtextxy(184,293,"25");
outtextxy(220,293,"26");
outtextxy(256,293,"27");
outtextxy(292,293,"28");
outtextxy(328,293,"29");
outtextxy(364,293,"30");
outtextxy(400,293,""); /*fifth row & condition c_2_30 ends*/
return;
}
c_3_30()
{ /*c_3_30 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"");
outtextxy(364,149,"1");
outtextxy(400,149,"2"); /*first row ends*/
outtextxy(184,185,"3");
outtextxy(220,185,"4");
outtextxy(256,185,"5");
outtextxy(292,185,"6");
outtextxy(328,185,"7");
outtextxy(364,185,"8");
outtextxy(400,185,"9"); /*second row ends*/
outtextxy(184,221,"10");
outtextxy(220,221,"11");
outtextxy(256,221,"12");
outtextxy(292,221,"13");
outtextxy(328,221,"14");
outtextxy(364,221,"15");
outtextxy(400,221,"16"); /*third row ends*/
outtextxy(184,257,"17");
outtextxy(220,257,"18");
outtextxy(256,257,"19");
outtextxy(292,257,"20");
outtextxy(328,257,"21");
outtextxy(364,257,"22");
outtextxy(400,257,"23"); /*fourth row ends*/
outtextxy(184,293,"24");
outtextxy(220,293,"25");
outtextxy(256,293,"26");
outtextxy(292,293,"27");
outtextxy(328,293,"28");
outtextxy(364,293,"29");
outtextxy(400,293,"30"); /*fifth row & condition c_3_30 ends*/
return;
}
c_4_30()
{ /*c_4_30 condition*/
outtextxy(184,149,"30");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"");
outtextxy(364,149,"");
outtextxy(400,149,"1"); /*first row ends*/
outtextxy(184,185,"2");
outtextxy(220,185,"3");
outtextxy(256,185,"4");
outtextxy(292,185,"5");
outtextxy(328,185,"6");
outtextxy(364,185,"7");
outtextxy(400,185,"8"); /*second row ends*/
outtextxy(184,221,"9");
outtextxy(220,221,"10");
outtextxy(256,221,"11");
outtextxy(292,221,"12");
outtextxy(328,221,"13");
outtextxy(364,221,"14");
outtextxy(400,221,"15"); /*third row ends*/
outtextxy(184,257,"16");
outtextxy(220,257,"17");
outtextxy(256,257,"18");
outtextxy(292,257,"19");
outtextxy(328,257,"20");
outtextxy(364,257,"21");
outtextxy(400,257,"22"); /*fourth row ends*/
outtextxy(184,293,"23");
outtextxy(220,293,"24");
outtextxy(256,293,"25");
outtextxy(292,293,"26");
outtextxy(328,293,"27");
outtextxy(364,293,"28");
outtextxy(400,293,"29"); /*fifth row & condition c_4_30 ends*/
return;
}
c_5_30()
{ /*c_5_30condition*/
outtextxy(184,149,"1");
outtextxy(220,149,"2");
outtextxy(256,149,"3");
outtextxy(292,149,"4");
outtextxy(328,149,"5");
outtextxy(364,149,"6");
outtextxy(400,149,"7"); /*first row ends*/
outtextxy(184,185,"8");
outtextxy(220,185,"9");
outtextxy(256,185,"10");
outtextxy(292,185,"11");
outtextxy(328,185,"12");
outtextxy(364,185,"13");
outtextxy(400,185,"14"); /*second row ends*/
outtextxy(184,221,"15");
outtextxy(220,221,"16");
outtextxy(256,221,"17");
outtextxy(292,221,"18");
outtextxy(328,221,"19");
outtextxy(364,221,"20");
outtextxy(400,221,"21"); /*third row ends*/
outtextxy(184,257,"22");
outtextxy(220,257,"23");
outtextxy(256,257,"24");
outtextxy(292,257,"25");
outtextxy(328,257,"26");
outtextxy(364,257,"27");
outtextxy(400,257,"28"); /*fourth row ends*/
outtextxy(184,293,"29");
outtextxy(220,293,"30");
outtextxy(256,293,"");
outtextxy(292,293,"");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_5_30 ends*/
return;
}
c_6_30()
{ /*c_6_30 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"1");
outtextxy(256,149,"2");
outtextxy(292,149,"3");
outtextxy(328,149,"4");
outtextxy(364,149,"5");
outtextxy(400,149,"6"); /*first row ends*/
outtextxy(184,185,"7");
outtextxy(220,185,"8");
outtextxy(256,185,"9");
outtextxy(292,185,"10");
outtextxy(328,185,"11");
outtextxy(364,185,"12");
outtextxy(400,185,"13"); /*second row ends*/
outtextxy(184,221,"14");
outtextxy(220,221,"15");
outtextxy(256,221,"16");
outtextxy(292,221,"17");
outtextxy(328,221,"18");
outtextxy(364,221,"19");
outtextxy(400,221,"20"); /*third row ends*/
outtextxy(184,257,"21");
outtextxy(220,257,"22");
outtextxy(256,257,"23");
outtextxy(292,257,"24");
outtextxy(328,257,"25");
outtextxy(364,257,"26");
outtextxy(400,257,"27"); /*fourth row ends*/
outtextxy(184,293,"28");
outtextxy(220,293,"29");
outtextxy(256,293,"30");
outtextxy(292,293,"");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_6_30 ends*//*30 condition ends*/
return;
}
c_0_29()
{ /*c_0_29 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"1");
outtextxy(292,149,"2");
outtextxy(328,149,"3");
outtextxy(364,149,"4");
outtextxy(400,149,"5"); /*first row ends*/
outtextxy(184,185,"6");
outtextxy(220,185,"7");
outtextxy(256,185,"8");
outtextxy(292,185,"9");
outtextxy(328,185,"10");
outtextxy(364,185,"11");
outtextxy(400,185,"12"); /*second row ends*/
outtextxy(184,221,"13");
outtextxy(220,221,"14");
outtextxy(256,221,"15");
outtextxy(292,221,"16");
outtextxy(328,221,"17");
outtextxy(364,221,"18");
outtextxy(400,221,"19"); /*third row ends*/
outtextxy(184,257,"20");
outtextxy(220,257,"21");
outtextxy(256,257,"22");
outtextxy(292,257,"23");
outtextxy(328,257,"24");
outtextxy(364,257,"25");
outtextxy(400,257,"26"); /*fourth row ends*/
outtextxy(184,293,"27");
outtextxy(220,293,"28");
outtextxy(256,293,"29");
outtextxy(292,293,"");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_0_29 ends*/
return;
}
c_1_29()
{ /*c_1_29 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"1");
outtextxy(328,149,"2");
outtextxy(364,149,"3");
outtextxy(400,149,"4"); /*first row ends*/
outtextxy(184,185,"5");
outtextxy(220,185,"6");
outtextxy(256,185,"7");
outtextxy(292,185,"8");
outtextxy(328,185,"9");
outtextxy(364,185,"10");
outtextxy(400,185,"11"); /*second row ends*/
outtextxy(184,221,"12");
outtextxy(220,221,"13");
outtextxy(256,221,"14");
outtextxy(292,221,"15");
outtextxy(328,221,"16");
outtextxy(364,221,"17");
outtextxy(400,221,"18"); /*third row ends*/
outtextxy(184,257,"19");
outtextxy(220,257,"20");
outtextxy(256,257,"21");
outtextxy(292,257,"22");
outtextxy(328,257,"23");
outtextxy(364,257,"24");
outtextxy(400,257,"25"); /*fourth row ends*/
outtextxy(184,293,"26");
outtextxy(220,293,"27");
outtextxy(256,293,"28");
outtextxy(292,293,"29");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_1_29 ends*/
return;
}
c_2_29()
{ /*c_2_29 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"1");
outtextxy(364,149,"2");
outtextxy(400,149,"3"); /*first row ends*/
outtextxy(184,185,"4");
outtextxy(220,185,"5");
outtextxy(256,185,"6");
outtextxy(292,185,"7");
outtextxy(328,185,"8");
outtextxy(364,185,"9");
outtextxy(400,185,"10"); /*second row ends*/
outtextxy(184,221,"11");
outtextxy(220,221,"12");
outtextxy(256,221,"13");
outtextxy(292,221,"14");
outtextxy(328,221,"15");
outtextxy(364,221,"16");
outtextxy(400,221,"17"); /*third row ends*/
outtextxy(184,257,"18");
outtextxy(220,257,"19");
outtextxy(256,257,"20");
outtextxy(292,257,"21");
outtextxy(328,257,"22");
outtextxy(364,257,"23");
outtextxy(400,257,"24"); /*fourth row ends*/
outtextxy(184,293,"25");
outtextxy(220,293,"26");
outtextxy(256,293,"27");
outtextxy(292,293,"28");
outtextxy(328,293,"29");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_2_29 ends*/
return;
}
c_3_29()
{ /*c_3_29 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"");
outtextxy(364,149,"1");
outtextxy(400,149,"2"); /*first row ends*/
outtextxy(184,185,"3");
outtextxy(220,185,"4");
outtextxy(256,185,"5");
outtextxy(292,185,"6");
outtextxy(328,185,"7");
outtextxy(364,185,"8");
outtextxy(400,185,"9"); /*second row ends*/
outtextxy(184,221,"10");
outtextxy(220,221,"11");
outtextxy(256,221,"12");
outtextxy(292,221,"13");
outtextxy(328,221,"14");
outtextxy(364,221,"15");
outtextxy(400,221,"16"); /*third row ends*/
outtextxy(184,257,"17");
outtextxy(220,257,"18");
outtextxy(256,257,"19");
outtextxy(292,257,"20");
outtextxy(328,257,"21");
outtextxy(364,257,"22");
outtextxy(400,257,"23"); /*fourth row ends*/
outtextxy(184,293,"24");
outtextxy(220,293,"25");
outtextxy(256,293,"26");
outtextxy(292,293,"27");
outtextxy(328,293,"28");
outtextxy(364,293,"29");
outtextxy(400,293,""); /*fifth row & condition c_3_29 ends*/
return;
}
c_4_29()
{ /*c_4_29 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"");
outtextxy(364,149,"");
outtextxy(400,149,"1"); /*first row ends*/
outtextxy(184,185,"2");
outtextxy(220,185,"3");
outtextxy(256,185,"4");
outtextxy(292,185,"5");
outtextxy(328,185,"6");
outtextxy(364,185,"7");
outtextxy(400,185,"8"); /*second row ends*/
outtextxy(184,221,"9");
outtextxy(220,221,"10");
outtextxy(256,221,"11");
outtextxy(292,221,"12");
outtextxy(328,221,"13");
outtextxy(364,221,"14");
outtextxy(400,221,"15"); /*third row ends*/
outtextxy(184,257,"16");
outtextxy(220,257,"17");
outtextxy(256,257,"18");
outtextxy(292,257,"19");
outtextxy(328,257,"20");
outtextxy(364,257,"21");
outtextxy(400,257,"22"); /*fourth row ends*/
outtextxy(184,293,"23");
outtextxy(220,293,"24");
outtextxy(256,293,"25");
outtextxy(292,293,"26");
outtextxy(328,293,"27");
outtextxy(364,293,"28");
outtextxy(400,293,"29"); /*fifth row & condition c_4_29 ends*/
return;
}
c_5_29()
{ /*c_5_29condition*/
outtextxy(184,149,"1");
outtextxy(220,149,"2");
outtextxy(256,149,"3");
outtextxy(292,149,"4");
outtextxy(328,149,"5");
outtextxy(364,149,"6");
outtextxy(400,149,"7"); /*first row ends*/
outtextxy(184,185,"8");
outtextxy(220,185,"9");
outtextxy(256,185,"10");
outtextxy(292,185,"11");
outtextxy(328,185,"12");
outtextxy(364,185,"13");
outtextxy(400,185,"14"); /*second row ends*/
outtextxy(184,221,"15");
outtextxy(220,221,"16");
outtextxy(256,221,"17");
outtextxy(292,221,"18");
outtextxy(328,221,"19");
outtextxy(364,221,"20");
outtextxy(400,221,"21"); /*third row ends*/
outtextxy(184,257,"22");
outtextxy(220,257,"23");
outtextxy(256,257,"24");
outtextxy(292,257,"25");
outtextxy(328,257,"26");
outtextxy(364,257,"27");
outtextxy(400,257,"28"); /*fourth row ends*/
outtextxy(184,293,"29");
outtextxy(220,293,"");
outtextxy(256,293,"");
outtextxy(292,293,"");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_5_29 ends*/
return;
}
c_6_29()
{ /*c_6_29 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"1");
outtextxy(256,149,"2");
outtextxy(292,149,"3");
outtextxy(328,149,"4");
outtextxy(364,149,"5");
outtextxy(400,149,"6"); /*first row ends*/
outtextxy(184,185,"7");
outtextxy(220,185,"8");
outtextxy(256,185,"9");
outtextxy(292,185,"10");
outtextxy(328,185,"11");
outtextxy(364,185,"12");
outtextxy(400,185,"13"); /*second row ends*/
outtextxy(184,221,"14");
outtextxy(220,221,"15");
outtextxy(256,221,"16");
outtextxy(292,221,"17");
outtextxy(328,221,"18");
outtextxy(364,221,"19");
outtextxy(400,221,"20"); /*third row ends*/
outtextxy(184,257,"21");
outtextxy(220,257,"22");
outtextxy(256,257,"23");
outtextxy(292,257,"24");
outtextxy(328,257,"25");
outtextxy(364,257,"26");
outtextxy(400,257,"27"); /*fourth row ends*/
outtextxy(184,293,"28");
outtextxy(220,293,"29");
outtextxy(256,293,"");
outtextxy(292,293,"");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_6_29 ends*//*29 condition ends*/
return;
}
c_0_28()
{ /*c_0_28 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"1");
outtextxy(292,149,"2");
outtextxy(328,149,"3");
outtextxy(364,149,"4");
outtextxy(400,149,"5"); /*first row ends*/
outtextxy(184,185,"6");
outtextxy(220,185,"7");
outtextxy(256,185,"8");
outtextxy(292,185,"9");
outtextxy(328,185,"10");
outtextxy(364,185,"11");
outtextxy(400,185,"12"); /*second row ends*/
outtextxy(184,221,"13");
outtextxy(220,221,"14");
outtextxy(256,221,"15");
outtextxy(292,221,"16");
outtextxy(328,221,"17");
outtextxy(364,221,"18");
outtextxy(400,221,"19"); /*third row ends*/
outtextxy(184,257,"20");
outtextxy(220,257,"21");
outtextxy(256,257,"22");
outtextxy(292,257,"23");
outtextxy(328,257,"24");
outtextxy(364,257,"25");
outtextxy(400,257,"26"); /*fourth row ends*/
outtextxy(184,293,"27");
outtextxy(220,293,"28");
outtextxy(256,293,"");
outtextxy(292,293,"");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_0_28 ends*/
return;
}
c_1_28()
{ /*c_1_28 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"1");
outtextxy(328,149,"2");
outtextxy(364,149,"3");
outtextxy(400,149,"4"); /*first row ends*/
outtextxy(184,185,"5");
outtextxy(220,185,"6");
outtextxy(256,185,"7");
outtextxy(292,185,"8");
outtextxy(328,185,"9");
outtextxy(364,185,"10");
outtextxy(400,185,"11"); /*second row ends*/
outtextxy(184,221,"12");
outtextxy(220,221,"13");
outtextxy(256,221,"14");
outtextxy(292,221,"15");
outtextxy(328,221,"16");
outtextxy(364,221,"17");
outtextxy(400,221,"18"); /*third row ends*/
outtextxy(184,257,"19");
outtextxy(220,257,"20");
outtextxy(256,257,"21");
outtextxy(292,257,"22");
outtextxy(328,257,"23");
outtextxy(364,257,"24");
outtextxy(400,257,"25"); /*fourth row ends*/
outtextxy(184,293,"26");
outtextxy(220,293,"27");
outtextxy(256,293,"28");
outtextxy(292,293,"");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_1_28 ends*/
return;
}
c_2_28()
{ /*c_2_28 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"1");
outtextxy(364,149,"2");
outtextxy(400,149,"3"); /*first row ends*/
outtextxy(184,185,"4");
outtextxy(220,185,"5");
outtextxy(256,185,"6");
outtextxy(292,185,"7");
outtextxy(328,185,"8");
outtextxy(364,185,"9");
outtextxy(400,185,"10"); /*second row ends*/
outtextxy(184,221,"11");
outtextxy(220,221,"12");
outtextxy(256,221,"13");
outtextxy(292,221,"14");
outtextxy(328,221,"15");
outtextxy(364,221,"16");
outtextxy(400,221,"17"); /*third row ends*/
outtextxy(184,257,"18");
outtextxy(220,257,"19");
outtextxy(256,257,"20");
outtextxy(292,257,"21");
outtextxy(328,257,"22");
outtextxy(364,257,"23");
outtextxy(400,257,"24"); /*fourth row ends*/
outtextxy(184,293,"25");
outtextxy(220,293,"26");
outtextxy(256,293,"27");
outtextxy(292,293,"28");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_2_29 ends*/
return;
}
c_3_28()
{ /*c_3_28 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"");
outtextxy(364,149,"1");
outtextxy(400,149,"2"); /*first row ends*/
outtextxy(184,185,"3");
outtextxy(220,185,"4");
outtextxy(256,185,"5");
outtextxy(292,185,"6");
outtextxy(328,185,"7");
outtextxy(364,185,"8");
outtextxy(400,185,"9"); /*second row ends*/
outtextxy(184,221,"10");
outtextxy(220,221,"11");
outtextxy(256,221,"12");
outtextxy(292,221,"13");
outtextxy(328,221,"14");
outtextxy(364,221,"15");
outtextxy(400,221,"16"); /*third row ends*/
outtextxy(184,257,"17");
outtextxy(220,257,"18");
outtextxy(256,257,"19");
outtextxy(292,257,"20");
outtextxy(328,257,"21");
outtextxy(364,257,"22");
outtextxy(400,257,"23"); /*fourth row ends*/
outtextxy(184,293,"24");
outtextxy(220,293,"25");
outtextxy(256,293,"26");
outtextxy(292,293,"27");
outtextxy(328,293,"28");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_3_28 ends*/
return;
}
c_4_28()
{ /*c_4_28condition*/
outtextxy(184,149,"");
outtextxy(220,149,"");
outtextxy(256,149,"");
outtextxy(292,149,"");
outtextxy(328,149,"");
outtextxy(364,149,"");
outtextxy(400,149,"1"); /*first row ends*/
outtextxy(184,185,"2");
outtextxy(220,185,"3");
outtextxy(256,185,"4");
outtextxy(292,185,"5");
outtextxy(328,185,"6");
outtextxy(364,185,"7");
outtextxy(400,185,"8"); /*second row ends*/
outtextxy(184,221,"9");
outtextxy(220,221,"10");
outtextxy(256,221,"11");
outtextxy(292,221,"12");
outtextxy(328,221,"13");
outtextxy(364,221,"14");
outtextxy(400,221,"15"); /*third row ends*/
outtextxy(184,257,"16");
outtextxy(220,257,"17");
outtextxy(256,257,"18");
outtextxy(292,257,"19");
outtextxy(328,257,"20");
outtextxy(364,257,"21");
outtextxy(400,257,"22"); /*fourth row ends*/
outtextxy(184,293,"23");
outtextxy(220,293,"24");
outtextxy(256,293,"25");
outtextxy(292,293,"26");
outtextxy(328,293,"27");
outtextxy(364,293,"28");
outtextxy(400,293,""); /*fifth row & condition c_4_28 ends*/
return;
}
c_5_28()
{ /*c_5_28condition*/
outtextxy(184,149,"1");
outtextxy(220,149,"2");
outtextxy(256,149,"3");
outtextxy(292,149,"4");
outtextxy(328,149,"5");
outtextxy(364,149,"6");
outtextxy(400,149,"7"); /*first row ends*/
outtextxy(184,185,"8");
outtextxy(220,185,"9");
outtextxy(256,185,"10");
outtextxy(292,185,"11");
outtextxy(328,185,"12");
outtextxy(364,185,"13");
outtextxy(400,185,"14"); /*second row ends*/
outtextxy(184,221,"15");
outtextxy(220,221,"16");
outtextxy(256,221,"17");
outtextxy(292,221,"18");
outtextxy(328,221,"19");
outtextxy(364,221,"20");
outtextxy(400,221,"21"); /*third row ends*/
outtextxy(184,257,"22");
outtextxy(220,257,"23");
outtextxy(256,257,"24");
outtextxy(292,257,"25");
outtextxy(328,257,"26");
outtextxy(364,257,"27");
outtextxy(400,257,"28"); /*fourth row ends*/
outtextxy(184,293,"");
outtextxy(220,293,"");
outtextxy(256,293,"");
outtextxy(292,293,"");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_5_28 ends*/
return;
}
c_6_28()
{ /*c_6_28 condition*/
outtextxy(184,149,"");
outtextxy(220,149,"1");
outtextxy(256,149,"2");
outtextxy(292,149,"3");
outtextxy(328,149,"4");
outtextxy(364,149,"5");
outtextxy(400,149,"6"); /*first row ends*/
outtextxy(184,185,"7");
outtextxy(220,185,"8");
outtextxy(256,185,"9");
outtextxy(292,185,"10");
outtextxy(328,185,"11");
outtextxy(364,185,"12");
outtextxy(400,185,"13"); /*second row ends*/
outtextxy(184,221,"14");
outtextxy(220,221,"15");
outtextxy(256,221,"16");
outtextxy(292,221,"17");
outtextxy(328,221,"18");
outtextxy(364,221,"19");
outtextxy(400,221,"20"); /*third row ends*/
outtextxy(184,257,"21");
outtextxy(220,257,"22");
outtextxy(256,257,"23");
outtextxy(292,257,"24");
outtextxy(328,257,"25");
outtextxy(364,257,"26");
outtextxy(400,257,"27"); /*fourth row ends*/
outtextxy(184,293,"28");
outtextxy(220,293,"");
outtextxy(256,293,"");
outtextxy(292,293,"");
outtextxy(328,293,"");
outtextxy(364,293,"");
outtextxy(400,293,""); /*fifth row & condition c_6_28 ends*//*28condition ends*/
return;
}
decor(int year,int month)
{
int p[10],y,x;
//int q=0;
char z;
char *yr[]={
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"
};
char *mth[]={
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
};
p[1]=year%10;
p[2]=year/10;
p[3]=p[2]%10;
p[4]=p[2]/10;
p[5]=p[4]%10;
p[6]=p[4]/10;
p[7]=p[6]%10;
p[8]=p[6]/10;
p[9]=p[8]%10;
setcolor(5);
settextstyle(4,HORIZ_DIR,3);
outtextxy(10,100,mth[month-1]);
settextstyle(4,HORIZ_DIR,3);
outtextxy(70,140,yr[p[1]]);
outtextxy(55,140,yr[p[3]]);
outtextxy(40,140,yr[p[5]]);
outtextxy(25,140,yr[p[7]]);
outtextxy(10,140,yr[p[9]]);
settextstyle(1,HORIZ_DIR,2);
//outtextxy(130,20,", thanks ");
outtextxy(240,50,"Calendar");
settextstyle(6,0,2);
setcolor(15);
outtextxy(240,370,"Developed By");
outtextxy(240,390,"Gautam Sasi");
return;
}

Is This A Good Question/Topic? 0
  • +

Replies To: error in converting from c to c++

#2 shoamal  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 15-January 09

Re: error in converting from c to c++

Posted 15 January 2009 - 10:29 AM

plz solve me out from this !!!when I compiled it there were abt 4 warnings listed!!....'parameter mnt never used ....yr never used.....so on . but the real problem is that i hav 2 convert it 2 c++!!!i dnt kno much abt c++!!!! so all those pros around plz help me at the earliest !!!
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6058
  • View blog
  • Posts: 23,495
  • Joined: 23-August 08

Re: error in converting from c to c++

Posted 15 January 2009 - 10:46 AM

Translation: Please help me cheat on my project by taking this code I found here, and converting it to what I need!

Don't know much about C++? Well, why would you have a project in C++? Were you supposed to learn C++, and perhaps didn't bother?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1