class is almost over...........

Nov 23, 2005 10:52


#include
#include
#include

void getInput(window&,apstring&,char&);
void drawCalc(window&,int,int,int,int);
void DrawScreen(window&,int,int,int,int);
void convert(apstring, apstring);

int main()
{
window w(300,340);
apstring val,val2;
char opration,opration2;
cout<<"For a sign change, press 'S'."<='0'&& ch<='9') val+=ch;
if (ch=='.')
{
if(!decipt)
{
val+=ch;
decipt=true;
}
}
w.DrawString(30,30,val.c_str());

if (ch=='+') done=true;
if (ch=='-') done=true;
if (ch=='*') done=true;
if (ch=='/') done=true;
if (ch=='=') done=true;

// if(opration=='+'||opration=='-'||opration=='*'||opration=='/')
w.SetBrush(GOLD);
w.DrawRectangle(25,25,275,55);
w.DrawString(30,30,val.c_str());
}

opration=ch;
}

void convert(apstring val, apstring val2)
{
char opration;
double d=atof(val.c_str());
double d2=atof(val2.c_str());

if(opration=='+') cout<
Previous post Next post
Up