I have written a code but i tried to alter it a little in this manner. But it seemed to not recognise what hexStack.getsize() > 0) is..??
any suggestion pls..
while(hexStack.getSize() > 0)
{
//buffer being a previously declared int
buffer = hexStack.pop();
//if it buffer (last value popped) is greater then 9... enter the switch statement
//to assign it a letter, else just display the number(since it won't need a letter
//representation
if(buffer > 9)
{
switch(buffer)
{
case 10 : cout << "A"; break;
case 11 : cout << "B"; break;
case 12 : cout << "C"; break;
case 13 : cout << "D"; break;
case 14 : cout << "E"; break;
default : cout << "F"; break;
}
}
else
cout << buffer;
}
cout << " in hexadecimal\n";
cout << endl;
return 0;