Urgent help needed.. C++ program to convert decimal to hexa decimal

Hi ,

   seq can be 0...128
        int windex = seq / 8;
        int bindex = seq % 8;
  unsigned char bitvalue = '\x01' << (7-bindex) ;
bpv.bitmapvalue[windex] = bitvalue;

This is the part of a program to convert decimal to bitmap value of hexadecimal.
I want this to change to convert only to hexa decimal not to bitmap value..
any one help me on this..

---------- Post updated at 06:44 AM ---------- Previous update was at 05:59 AM ----------

can any one help me on this..?

Are you tryong to convert seq into hexadecimal? Then one of the ways would be to use %x format, like in following

 printf("%x\n", seq);