Hello Dave,
to convert integer to ASCII string:
#include <stdio.h>
char szBuf[50];
int i = 123;
sprintf (szBuf, "%i", i);
to convert ASCII string to integer
#include <stdio.h>
#include <stdlib.h>
char szBuf[50] = "123";
int i;
sscanf (szBuf, "%i", &i); // method #1
i = atoi (szBuf); // method #2
to convert an ASCII character to an integer
char cCh = 'A';
int i = static_cast<int>(cCh);
to convert an integer to an ASCII character
int i = 65;
char cCh = static_cast<char>( i); // cCh is set to 'A'
"David Williams" <ds********@dsl.pipex.com> wrote in message
news:3f**********************@news.dial.pipex.com. ..
Hi all, i have been able to convert an ASCII character to an INT however
im lost as to how to change them back. Cant find anything on the net (though
im probably looking in the wrong places!). Could anyone help me out?
Thanks
Dave