Warmaster199
Mar 7th, 2001, 03:29 PM
I have made a function for displaying text basing the coordinates on a given XY point:
void xytext(int x, int y, char *text)
{
move_to(x,y); /*move graphics device to x,y */
plots(text); /*plots the text string */
}
This will plot the given text to a given point. This is intended for powerc(you can use another compiler) or any compiler that doesn't have the function outtextxy();
Here is my problem: I would like to turn an integer so I can put it into a string, to display it using this function. I'm not good with strings, so can you tell me how I could add that string(converted int) to the end of another string(a phrase), so I can do something like this:
"Mouse X = " + (Interger(say 77) to string)
"Mouse X = " + "77"
"Mouse X = 77"
You get it? Please help me on this. It's EXTREMELY IMPORTANT!!!
void xytext(int x, int y, char *text)
{
move_to(x,y); /*move graphics device to x,y */
plots(text); /*plots the text string */
}
This will plot the given text to a given point. This is intended for powerc(you can use another compiler) or any compiler that doesn't have the function outtextxy();
Here is my problem: I would like to turn an integer so I can put it into a string, to display it using this function. I'm not good with strings, so can you tell me how I could add that string(converted int) to the end of another string(a phrase), so I can do something like this:
"Mouse X = " + (Interger(say 77) to string)
"Mouse X = " + "77"
"Mouse X = 77"
You get it? Please help me on this. It's EXTREMELY IMPORTANT!!!