Hello, does anyone know if it is possible to convert part of an array e.g Sarray[1] to Sarray[5] to a single integer variable to perform calculation.
Am trying to do a calculator in mfc with buttons (nothing to hide.. its a homework) but the teacher doesnot code in cpp, so i have no choice except to code in vb which i don't code in. despite the teacher want to help me he can't since its cpp.
Am doing it using mfc.
my algo is as follows....
Assume am pressing button 5 , three times
char Sarray [9] //max numbers on display
counter=1;
int actualnum
{
when button 5 press
Sarray[counter]='5'
put Sarray[1 to counter] in actualnum; //where am having trouble
counter=counter+1;
}
The above doesnot have any real codes, except for the int and char etc.., i can manage with the rest, just wrote them in simple english for the easy understanding, Am stuck in the part where i would need to combine the
Sarray[1]=5;
Sarray[2]=5;
Sarray[3]=5;
into actualnum=555
Any idea?
Thanks