I'm using a third-party library called "graphics" with which I'm trying to show a binary tree type data structure graphically, my problem is that there is a function called:
outtextxy(posicionX,posicionY,const *char)
and I have a struct done like this:
struct ABB {
int dato;
ABB *der;
ABB *izq;
ABB *padre;
}*arbol;
The data is normally entered in the struct but I can not show it in the function because it is not of type const * char ... What I want to do is convert that data into the struct in a const * char variable so that it allows me to enter them in the outtextxy function but I can not find a way to do it! I hope you can help me with this !!!
Here I show the code of the function outtextxy
void outtextxy(int x, int y, char *textstring){
HDC hDC = BGI__GetWinbgiDC( );
WindowData* pWndData = BGI__GetWindowDataPtr( );
// check alignment
if (pWndData->alignment != TA_NOUPDATECP)
{
pWndData->alignment = TA_NOUPDATECP;
set_align(pWndData);
}
TextOut(hDC, x, y, (LPCTSTR)textstring, strlen(textstring));
BGI__ReleaseWinbgiDC( );
RefreshWindow( NULL );
// Todo: Change to refresh only the needed part.}