id just use the itoa function with a while loop.
some psudo C code to get your brain working
Code
int main()
{
char output[25];
int first, second;
printf("enter first char: ");
scanf("%d", &first);
printf("\nenter second char: ");
scanf("%d", &first);
while(first <= seccond)
{
itoa(first, output, 10);
printf("\ndecimal: %s\n", output);
itoa(first, output, 16);
printf("Hexidecimal: %s\n", output);
itoa(first, output, ???); //forgot the base to oct
printf("octl: %s\n", output);
first++;
}
return 0;
}
that code is in C and not C++. it is using C functions and is not suitable for your homework. its just psudo code to see how the while loop may be structured.
this is also bad code because it assumes first is ALWAYS less than second and uses it without doing any user input checking.
basically what you want to do is, while the first letter is less than the second (you may need to cast them to integer for doing the checks depend how you set them up), you do your math or use a c++ function to change the base of the decimal of the inputted character, then print it out and then increment the first char. ex: first char was 'a' (97) and you increment it it would become 'b' (98)
edit:: changing the base of a decimal is easy via math just google it. there was no need to use the itoa function on my half but i didnt want to give you everything.
This post was edited by AbDuCt on Sep 27 2012 07:45am